aldweb

Fermer I. aldweb

Fermer II. Gratuitiels PC

Fermer III. Gratuitiels Palm

Fermer IV. Partagiciels Palm

Fermer V. iziBasic Palm

Fermer VI. Connaissance Palm

Fermer VII. Ordinateur Poche

Fermer VIII. miniPortail

Spécial !



Version mobile
de l'aldweb Site

m.aldweb.com


Ni Français, ni Anglais ?

Essayez donc l'un de ces drapeaux :
[de] [es] [it] [pt]
Recherche




Météo / Spam / www

Météo Lyon


aldweb contre le SPAM


Newsletter
Pour avoir des nouvelles de ce site, inscrivez-vous à notre Newsletter.
S'abonner
Se désabonner
298 Abonnés
Sites web de la famille

Webmaster - Infos
News Amis
Visites

   visiteurs

   visiteurs en ligne

Sondage
Comment trouve-tu le nouvel habillage de l'aldweb Site ?
 
Superbe !
Joli
Moyen
Moche...
Résultats
forum.gifForum - iziBasic - Sujet n°1217

Forum - Forum
iziBasic - iziBasic


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

actif  Sujet n° 1217  Arrays

le 18/06/2005 @ 02:37
par Netzley

Anonyme



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

  Poster une réponse  Haut

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

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut

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

Anonyme

visiteur
Gotcha. Thank you very much for taking the time to help. I'm sure I'll have a thousand more questions.
  Poster une réponse  Haut
actif sujet actif   clos sujet clos   Important! Important!   Nouveau Nouveau message   -   Rectifier Rectifier message   Clôturer Clôturer sujet   Remonter Remonter
[]
Catégories de discussion  Forum 



 
^ Haut ^