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.

DarkBASIC Professional Discussion / Another Select...Case problem

Author
Message
Ratty Rat
21
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 10th Oct 2002 21:06
the following code should go to the first case but instead goes to the second:-

dim i(1)
i(1) = 1
one = 1

select i(1)
case one
Print "i = 1"
endcase
Case Default
Print "Unable to determine value of i"
endcase
endselect
wait key

Oddly if 'i' is not an array or you put 'case 1' instead of 'case one' it works.

Bit odd that.
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 11th Oct 2002 01:32
There is a problem with the SELECT..CASE system - I'm not sure whether patch #2 fixes this - according to the information given, it only mentions strings...

Yes, I really am THAT good...
Ratty Rat
21
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 12th Oct 2002 18:26
Yes, I spotted the Case Select string thing almost immediately as my only completed game to date,Breakout 3d, written in DB 1.13, uses them extensively. I had a nice ini/game config file system that read off a parameter name from a text file and created object/textures etc based on these commands, it made the file easily readable.
I had to go through all this and change them to If`s.
Changing my game to DBPro has proved a real pain,I have hit problems with almost all the current DBPro bugs, I`m almost there now, if the next patch fixes some of the array and type problems I will probably be able to finish and finally able to look to start something new, using those sexy new DBPro features!

Login to post a reply

Server time is: 2024-03-29 05:51:14
Your offset time is: 2024-03-29 05:51:14