home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
jËzyki_programowania
/
amigae
/
e_v3.2a
/
src
/
guide
/
static2.e
< prev
next >
Wrap
Text File
|
1977-12-31
|
465b
|
18 lines
PROC main()
DEF i, a[10]:ARRAY OF LONG, p:PTR TO LONG
FOR i:=0 TO 9
a[i]:=List(3)
/* Must check that the allocation succeeded before copying */
IF a[i]<>NIL THEN ListCopy(a[i], [1, i, i*i], ALL)
ENDFOR
FOR i:=0 TO 9
p:=a[i]
IF p=NIL
WriteF('Could not allocate memory for a[\d]\n', i)
ELSE
WriteF('a[\d] is an array at address \d\n', i, p)
WriteF(' and the second element is \d\n', p[1])
ENDIF
ENDFOR
ENDPROC