:?

Blitz3D Forums/Blitz3D Beginners Area/:?

Yo! Wazzup?(Posted 2007) [#1]
a colon : ? I don't get it. How is it used?


Yahfree(Posted 2007) [#2]
no use for it really, just to keep your code more readable/orginized


Example

crappy:
If hello=1 then color 123,132,123 drawimage image,x,y hello=2


this is more readable:
If hello=1 then :  color 123,132,123 : drawimage image,x,y : hello=2



GfK(Posted 2007) [#3]
this is more readable:

If hello=1 then : color 123,132,123 : drawimage image,x,y : hello=2

It isn't more readable than this:
If hello=1
  color 123,132,123
  drawimage image,x,y
  hello=2
EndIf



Matty(Posted 2007) [#4]
A colon is simply used to allow multiple commands to be placed on a single line. They do not execute any differently - ie they still execute one after the other.

I cannot tell you whether it is good or bad practice to use them.


Yo! Wazzup?(Posted 2007) [#5]
Ok, thanks!