Does anyone know the quickest way to empty an array.
This is the array called Vnamei.
istring Vnamei[800,20000] - room for 800 characters, and 20,000 entries.
I've been told that something like Vnamei = "", now I'm either doing something wrong or that's incorrect.
So at the moment I'm doing:
FOR x = 0 TO 1000
Vnamei[0,x] = ""
NEXT x
which works, but takes up time.
Does anyone have ideas on this?
Thanks,
Andy.
Vnamei[0]=NULL - Does that work?
Brian
Edit: Andy, you asked Larry McC two years ago about this. Just found the answer, I think:
ISTRING buf[8]
rtlzeromemory(buf,LEN(buf))
Is this what you are after?
Brian,
Thanks for that, knew I'd been here before, yes that's the one I think.
Cheers,
Andy.
I was just getting ready to post that Brian.
Also, I believe if you can write your program in such a way as to use the New command it MAY zero out memory, but not sure.
Hmm
this one is interesting ,i do something like that in the past but i forget how .
Maybe i use CHAR then FreeMem i am not sure... ::)
Aurel,
Brian asked pretty much the same question just recently, If it's an array and just for normal every day use i.e. not sensitive data then pointers are far the quickest.
Create a pointer, use it, delete it, and the re-create it again for later use.
See the timings at the end of this thread:
http://www.ionicwind.com/forums/index.php?topic=6120.25
Andy.