Multiple line statements?

Blitz3D Forums/Blitz3D Beginners Area/Multiple line statements?

Well, I'm not a newbie, but it's a simple question...

Is there any way to extend a simple command over more than one line in the editor? It would be really useful.

how do you mean?

e.g:
Positionentity geezer,
               <big long equation for xpos>,
               <y.................>,
               <z.................>


On multiple lines rather than one in the editor. Could make some stuff clearer.

To my knowledge, there is no way to do what you want to do (at least without a pre-processor of some sort).

Blitz reads an end-of-line as the end-of-statement, and there is no "statement continuation" character (e.g. "_") that I know of.

if Blitz used some sort of end-of-statement character like C/C++ and Delphi do then it would be possible...

Alas my fear is that soja is correct, think I'll put it in as a feature request.

o don't know if this would work but could you possibly could do it like this

a = section of code
b = a another section
c = so on
d = so on

Positionentity geezer = a+b+c+d


ok that might work or it maybe completely wrong

@ Agamer: that wont work for sure!!!

that wont work but you can do something like this

xPos = <long equation>
yPos = <...>
zPos = <...>

PositionEntity geezar,xPos,yPos,zPos

Aye I know but I wanted to avoid assigning loads of throwaway variables. I'd prefer to stick with long lines than do that.

Throwaway variables are great for readability! :)

are so i gave a load of rubish advice lol

Throwaway variables are great for readability! :)


And terrible for speed. Use less variables in speed demanding areas of your program.


And terrible for speed...


That entirely depends on your compiler and how much optimization it does. However, in the case of Blitz, I think you're right.

Except if the computed value can be used more than once, but that is a special case.