Quote: "If you don't, DBP declares them for you, but I don't trust that. Besides, it's professional to have every variable initialized at the top of your program. It's what you have to do in C++ or Java or any other of those many programming languages that aren't BASIC."
There's no reason to declare every variable like that global though... I mean, this:
function random_float(rnd_start,rnd_end,float_digits)
...
endfunction x#
isn't much different from this:
public float random_float(int rnd_start, int rnd_end, int float_digits)
{
...
}
Definitely not different enough (IMO) to really justify declaring everything global. I think declaring everything global is a good was to cause weird errors.
Anyways, @ kkun, it's a really good idea to keep in mind that 0<=rnd(x)<=x, so rnd(100) would return one of 101 possible results, while rnd(99) would return one of 100 possible results. It's not too tricky if you think it through, but I've had major pains because I've overlooked rnd statements