Qbasicnews.com

Full Version: Initializing variables on declaration line
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Tonight I decided to jump back into BASIC again but instead of wasting time with QB, I've decided to just start using FreeBASIC. If it ends up being decent in speed concerning SDL and OpenGL, well I might just stop using C. I mean, what's the point in using something more difficult especially when I program mainly for a hobby. :wink:

There is one thing I liked about other languages (such as C) though. And that was the ability to set variables on the lines they are declared on. Example:

Code:
Dim Pi As Single = 3.14159

I don't absolutely have to have it in there but it'd be easier. Less typing.

Less space taken up when in a contest. :lol:
It's planned to next releases, but first i gotta get those nice bugs fixed first ;)

It will have to handle array initialization too, plus on sub routines, that must be done with code, won't be too simple.
Dim foo As integer, moo as integer, poo as string

Sad