aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1217

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1217  Arrays

18/06/2005 @ 02:37
by Netzley

Anonymous



I am having a little trouble trying to figure out arrays. There is very little by way of explanation in the basic examples and it is sort of ard to figure out the manual on this. I want to first set up an array that is 40 numbers long, in addition to using the variables A-Z. In each of the 40 positions I would like to have a seperate #. Here is how I would do it:

DIM V(40)

BEGIN
FOR N=0 TO 39
V(N)=N
NEXT

FOR N=0 TO 39
A=V(N)
A=A+5
V(N)=A
NEXT

  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
--------
18/06/2005 @ 20:49
by aldweb

Anonymous

visitor
Hello Netzley,

So, let me try to explain better than I succeeded to do in the user manual (By the way, did you read the appendix which explains the memory structure of iziBasic? There are very useful informations there about arrays).

There are only 2 arrays in iziBasic: A() and A$­­­(). Both address the complete data memory storage.
A(1) to A(26) are for the A to Z storage (same thing with A$­­­() of course).
iziBasic then does a DIM A(26) by default unless you override it with a higher value.
So, your own array storage may start at A(27).
Knowing this, your sample source code would be:
DIM A(66) ' that is 26 for A-Z + 40 free 
' spaces above

BEGIN
FOR N=0 TO 39
I=N+27
A(I)=N
NEXT

FOR N=0 TO 39
I=N+27
A=A(I)
A=A+5
A(I)=A
NEXT

Cheers,


@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
19/06/2005 @ 03:30
by Netzley

Anonymous

visitor
Gotcha. Thank you very much for taking the time to help. I'm sure I'll have a thousand more questions.
  Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^