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.

Author
Message
Abiz
12
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 20th Dec 2012 20:14
This works



Why doesn't this work?



I'm not sure if the undim works but I centainly don't get the message().

I've had simular situations before and it looks like that the command that's behind the THEN has something to do with it.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Dec 2012 21:14
There is no undim command.

It's surprising that you didn't get an execution error in the first case.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Abiz
12
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 20th Dec 2012 21:54
http://www.appgamekit.com/documentation/language/6_undim.htm
Abiz
12
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 20th Dec 2012 22:03
And it's also mentioned here:
http://www.appgamekit.com/documentation/language/5_dim.htm
....To free an array created this way, use the undim command.

But you're right, i just saw that the parser gives an error in the ErrorReport. During execution you get no error.
Apparently it just ignores it , and as a result skips the next instruction.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Dec 2012 22:31
Okay. I looked for undim in the same command list as dim and couldn't find it. Sorry about that.

My question is then where do you define 'JA' used in this if..then statement? Is it defined as 1 somewhere? (To be the same as the first example.)

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Abiz
12
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 21st Dec 2012 00:24
JA means YES in Dutch, and it is defined.
#constant JA 1

I also tested it with 1 instead of JA with the same result.
But like I said, you were right, undim does not exist, and it was stated in the ErrorReport.

Thanks for your answer.
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 21st Dec 2012 01:02
Looks like that part of the manual (re: undim) is leftover from the DarkBASIC manual.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 21st Dec 2012 02:24
In the text file listing bug fixes for AppGameKit (look in the installation folder) it says this under 17/5/12 Build 107:
Quote: "Teir 1 -> undim does not appear to work fixed"


I can't explain the errorReport. Maybe it's due to trying to free and already freed array.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 21st Dec 2012 09:01
I use undim for temporary arrays. I don't get any errors and just assumed it is working but I haven't tested memory usage to see if it actually does anything...


this.mess = abs(sin(times#))
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 21st Dec 2012 15:51
Abiz, what version of AppGameKit are you working with? That might help explain why it doesn't work for you.

(And I know 'Ja' means 'yes' in Dutch, I lived and worked in Den Haag for four years, right across the street from the World Court. Sadly, I was not able to learn the language properly and no one could understand me when I tried to say my address: 31 Jacob Gilles Straat.)

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 03:22:59
Your offset time is: 2024-11-24 03:22:59