Splitting long lines of code
Blitz3D Forums/Blitz3D Beginners Area/Splitting long lines of code
| ||
What is the syntax for splitting a long line of code so that it's easier to read in the ide? There must be a way but I've just spent ages searching the forums and I can't find it. |
| ||
I am not sure there is, what you probably should do is if your line is because your doing calculations inside a function param then do them before, example:CreateWindow((graphicswidth()/2)+(MouseX()/3)+3,graphicsheight()/2)+(MouseY()/6)) etc etc do this instead: local wX% = (graphicswidth()/2)+(MouseX()/3)+3 local wY% = (graphicsheight()/2)+(MouseY()/6) CreateWindow(wX,wY) It makes it far easier to read and to debug at a later date. I usually use temporary calculation variables like this if I am doing anything more than +1 etc, as you can document them. |
| ||
Print .. "Hello" |
| ||
gfk - that doesn't work in Blitz3D. You are thinking of BMax. :) |
| ||
I dont think B3D has this... it would be really usefull though :( |
| ||
gfk - that doesn't work in Blitz3D. You are thinking of BMax. It doesn't? Haven't used Blitz3D in years but I thought it did for some reason. :/ |
| ||
Think that must be Bmax - doesn't work in b3d. Thanks for the replies. Anyone else? Or is it something lacking in b3d? Bit of a pain if it is but I guess I'll live :) |
| ||
I'd find this useful too, I post blitz3D tutorials on youtube and it's a pain putting long lines of code in because it's hard to show them on the video. [shameless plug] http://www.youtube.com/amcadam26 [/shameless plug] |
| ||
Blit3D definately doesn't have this feature, unforunately. There's been many a time I wished it had, tho. :/ |
| ||
You can combine lines in B3D, but I don't think this is what your looking for :( [code] string$ = "Hello World" : Print string$ |