Spécial ! |
Version mobile de l'aldweb Site m.aldweb.com Ni Français, ni Anglais ?Essayez donc l'un de ces drapeaux :
|
|
Météo / Spam / www |
Météo Lyon
aldweb contre le SPAM
|
|
|
|
|
|
|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Sujet n° 1034 |
Use of case statements |
le 05/01/2005 @ 17:45 par Mike Featherstone
|
I'm starting to convert some of my chains of 'if' statements into 'case' statements (Thanks!) but I've hit a problem.
The following code segment compiles (and runs):
1 o=1 2 o$="Hi" 3 Select Case 4 Case 1 5 Print o$ 6 End Select
However the following produces a syntax error at line 7:
1 o=1 2 o$="Hi" 3 Select Case 4 Case 1 5 Print o$ 6 End Select 7 Select Case 8 Case 1 9 Print o$ A End Select
I thought that the End Select at line 6 closed off the first Select Case allowing me to use a second. Where have I gone wrong?
Mike www.palm247.com |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1 -------- le 05/01/2005 @ 17:49 par aldweb
visiteur |
Hello Mike, the syntax should be: SELECT CASE oneVariable Otherwise, how do you want iziBasic to know what to select something against?
I badly have no way to check your 2 listings, because I just crashed my Tungsten C's display this morning So, I am left without any device So, I'll have to install the Palm Emulator or Simulator to keep the support going on here!
Cheers
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2 -------- le 05/01/2005 @ 17:54 par Mike Featherstone
visiteur |
I'm sorry, it was a forum typing error. The code samples should be amended to read:
Select Case o
in each case!
(Sorry to hear about the 'C') |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3 -------- le 05/01/2005 @ 20:19 par aldweb
visiteur |
Mike, indeed... Good job... you found 1st bug of v4.0
Cheers
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 4 -------- le 06/01/2005 @ 11:17 par Mike Featherstone
visiteur |
Is there a prize? Or perhaps a certificate? |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 5 -------- le 06/01/2005 @ 12:59 par aldweb
visiteur |
Mike, you deserve both
Prize: You will receive a free upgrade to version 4.1 when it is made available. (well, just like all other users...)
Certificate: I, aldweb, bad developer of iziBasic, certify that Mike Featherstone, talentuous reviewer at Palm247.com, has reported the first bug of the brand new version 4.0 of iziBasic.
Cheers
@+ aldweb |
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|
|
|
|
|
|