Variables and Declares!

Blitz3D Forums/Blitz3D Programming/Variables and Declares!

Neochrome(Posted 2010) [#1]
this sounds a little stupid for a C++ programmer, but in Blitz You dont seem to have the need to Declare a variable unless needed globally!

BUT in a function is it beneficial to declare Locals?

or done in good practice?


Yasha(Posted 2010) [#2]
1) Excellent practice.

2) A good IDE like IDEal offers "Strict mode", which can keep track of declared variables for you to root out typos.

3) Declaring a name as Local will automatically override that name if it's also been declared as Global, so you can safely use it without worry.


Neochrome(Posted 2010) [#3]
Thanks :D Yasha, i found IDEal to be AWESOME! the writer of this IDE is awesome!, tho i would love to see a few more features in it, like "point to function"

so you can jump to function..


_PJ_(Posted 2010) [#4]
With IDEal You can right-click a function under the mouseopointer and select the Goto-Declaration which will jump the cursor to the functin declaration. This spans across multiple files in a project too :)


Neochrome(Posted 2010) [#5]
CTRL+D.. oh yeah! hehe, whoops!> pretty new the IDEal, the coder should update it soon tho!

Damn near perfect IDE too!

Thanks Malice.


MusicianKool(Posted 2010) [#6]
I've like Protean, as much as it crashes I still like it.