Just an idea that spawned recently in a corner of my head. I don't know if it is where it can be posted, sorry if I'm wrong in this anyway.
So it's about an issue that every beginner may meet, namely telling what version of fb he is running, on what platform exactly (and so on). I started a small code that could maybe be added as an example somewhere, ranking just after the classic "hello world" in my opinion, and more useful.
Code: Select all
'source code for giving self-description of fb and its current running environment
var osState => "_"
var fbVer => __FB_VERSION__
var fbSig => __FB_SIGNATURE__
var fbLng => __FB_LANG__
var fbArg => __FB_ARGC__
osState &= "64bits_"
osState &= "32bits_"
osState &= "Linux_"
osState &= "ARM_"
? "freebasic compiler version number "; fbVer, """"& fbSig &""""
? "freebasic current dialect in use "; uCase(fbLng)
? "number of arguments passed to this application "; fbArg
? "state of the OS currently running "; osState
That's very simple at first sight, but hard to reach for the very beginner, and although so useful (in particular to communicate in the forum about a personal issue).
What I would like to add before leaving this to the appreciation of everyone, is that it could be extended to provide the current available stack size (I remember fxm having posted a how-to about this somewhere), and maybe thing like the graphics drivers names and all basic details, yet not having to be intrusive, that can help protraying the user's configuration in order to help him know what is going on, and ask for help more efficiently.
Thanks for the attention! Feel free to comment on this, or no ;)
edit: oh and something like this could also help:
Code: Select all
var s => "unicode test!"