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° 1164 |
SUGGESTION: FOR NEXT functionality |
le 13/03/2005 @ 02:28 par Christof
|
Hi! Well, I bought the full version after a couple days playing with the trial. This is a fantastic development tool and has tremendous potential! It could be what i have been looking for for 4 years.
The FOR NEXT statements are somewhat limited. Am I right in my findings that you cannot use any but the 26 single letter variables in loop counters? and it seems that there is not a way to nest loops.
what I mean is:
for mycounter1 = 1 to 10 do stuff for mycounter2 = 1 to mycounter1 do more stuff next mycounter2 do yet more stuff next mycounter1
I know there are ways to work around it, but would this be a possible addition to izibasic?
also, when working with the console (which I know is mostly for exploring the language) it would be nice to have a locate statement to set the cursor position- or maybe I have missed another command that does that.
thanks for writing this, it's 5.0 E6 times better than any other onboard palm BASIC, and FAST :)
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1 -------- le 13/03/2005 @ 13:34 par Steven
visiteur |
Christof,
Change a couple of things and your code will work. First, you don't use the variable name with NEXT in iziBasic, just NEXT by itself. Secondly, to use other than single letter variable names you have to declare them at the beginning of the program like this:
dim %mycounter1% 'number dim %mycounter2% 'number dim %mywords1$ 'text
BEGIN . . . END
Use GPRINT and GOTOXY simulate LOCATE and PRINT AT. They are in pixels but you can figure that out.
Good Luck! Steven |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2 -------- le 13/03/2005 @ 13:37 par Steven
visiteur |
In my reply previously, I forgot to say that the % and $ symbols are part of the variable name and are always required for 'long' variable names.
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3 -------- le 13/03/2005 @ 18:27 par christof
visiteur |
Aha!
I had gone right past the DIM statement in the manual (assuming it referred to dimensioning custom arrays or something)
And I'm still a bit confused about how or if console and graphics modes mix. It's not a really big deal, I just wanted to use console mode for some playing around while figuring out the language.
thanks for the help! -Christof |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 4 -------- le 13/03/2005 @ 18:37 par aldweb
visiteur |
And, hopefully, FOR / NEXT can be nested in iziBasic, like any other loop statement! Otherwise... this compiler would still be in my device only!
Cheers
@+ aldweb |
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|
|
|
|
|
|