Qbasicnews.com

Full Version: impliment this, v1c?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ERASE erases dynamic arrays and deallocates them in FB. how about a clear-the-values ERASE for static arrays? could give it another keyword if you had to. *shrug*

would be nice tho. Smile
there already support for somthing like that.

it's called ALLOCATE and DEALLOCATE

if you alloacte your own dynamic memorey you and dealloacte it your self.
Quote:ERASE erases dynamic arrays and deallocates them in FB. how about a clear-the-values ERASE for static arrays? could give it another keyword if you had to. *shrug*

would be nice tho. Smile

Shouldn't you just loop through and set them to 0 or null or ' ' or whatever yourself? I mean, good programming practice means initializing these variables yourself in the first place.
I don't see why you'd care what the values were. Once you erase them you don't have access to them, so it wouldn't matter if the data were garbage or the gaussian interpolation of the answer to life, the universe, and everything (which just so happens to be 42, of course)


Now that dead horse is beaten,

Is it possible to alter the error reporting behavior slightly?
It would be extremely helpful if fbc output the offending line in the event of a syntax error (or grammatical). Right now, it only outputs the line number and what the error was. Since I tend to use notepad (or on some occasions am still known to use copy con), I don't get the luxury of having line numbers displayed. I can't tell you what a pain it is to count each line all the way down, and still wonder if I counted right (do I count remarks? do I count blank lines? do I count #defines? etc)

I suppose the output of the full error line could be optional, but it would be nice to have somewhere.
QBasic had that set-to-0 static arrays ERASE.
use CLEAR
Hordeking, you do have access to them. dynamic arrays were removed from memory. static arrays were reset. QB had that as Antoni said.

DrV, CLEAR? if it's the same as QB's CLEAR i don't think that's the way to go... or maybe i'm wrong.
Quote: CLEAR Statement (diff: completely different mean: used to fill a memory block with some value, args are:
byref dst as any, byval value as integer = 0, byval bytes as integer)
yeah i appologize... it ought to help to read the dang keywords file. Smile
ERASE for non-dynamic arrays added, will be on the next release..