Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / UNDIM = Unknown command ?

Author
Message
kaband
21
Years of Service
User Offline
Joined: 22nd May 2003
Location: Chicago
Posted: 2nd Sep 2011 06:19
I'm trying to destroy an array, but am getting an unknown command error on the undim statement when executing. I also noticed it didnt turn that pretty blue that the known commands do when I entered it.

DIM myList[10]
myList[1] = 33
UNDIM myList[]

I haven't found anyone else posting about this (at least via search).

Am I entering something incorrectly or is this an existing issue?

Thanks.
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 2nd Sep 2011 08:34
I did already post about it here but I'm not sure a search would have turned it up.

Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 2nd Sep 2011 11:37
Not certain that UNDIM is in the language. I'm pretty sure you can use REDIM or simply declare the array again when you want to wipe it.
Bursar
16
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 2nd Sep 2011 11:49 Edited at: 2nd Sep 2011 11:50
Quote: "Not certain that UNDIM is in the language."

Docs say that is: http://www.appgamekit.com/documentation/language/6_undim.htm

Quote: "I'm pretty sure you can use REDIM or simply declare the array again when you want to wipe it."


There is no reference to REDIM in the docs, but equally I haven't tried to use it (or tried to redeclare the array).
kaband
21
Years of Service
User Offline
Joined: 22nd May 2003
Location: Chicago
Posted: 2nd Sep 2011 20:48 Edited at: 2nd Sep 2011 20:48
@ Rich - I missed your post. Glad I wasnt the only one who noticed.

REDIM doesnt work and Bursar is correct that UNDIM is referenced in the documentation. Redeclaring the array works w/o a problem. I'll just use that. The documentation should probably be updated.

Thanks for everyone's help.
kaband
21
Years of Service
User Offline
Joined: 22nd May 2003
Location: Chicago
Posted: 3rd Sep 2011 17:07
Ok, I take back what I said about redeclaring the array working to wipe it out. I can redeclare it, but all the values in the array stick. For my purposes I can loop through the array and set every value to 0.

It would be nice to have a command that would blow the array away completely. Maybe the UNDIM command can be added.

Login to post a reply

Server time is: 2024-11-21 17:32:47
Your offset time is: 2024-11-21 17:32:47