Weather / Spam / www |
Lyon Weather
aldweb against spam
|
|
|
|
|
|
|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 1164 |
SUGGESTION: FOR NEXT functionality |
13/03/2005 @ 02:28 by 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
Answer n° 1 -------- 13/03/2005 @ 13:34 by Steven
visitor |
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
Answer n° 2 -------- 13/03/2005 @ 13:37 by Steven
visitor |
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
Answer n° 3 -------- 13/03/2005 @ 18:27 by christof
visitor |
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
Answer n° 4 -------- 13/03/2005 @ 18:37 by aldweb
visitor |
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 |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|
|
|
|
|