September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,12 +1,32 @@
|
|||
in$ ="Not,Hardly,Just,Adequately,Quite,Really,Very,Fantastically,xyzzy"
|
||||
element$ =""
|
||||
i =1 ' used to point to successive elements
|
||||
DEF AList:POINTER
|
||||
|
||||
do
|
||||
element$ =word$( in$, i, ",")
|
||||
if element$ ="xyzzy" then exit do
|
||||
print element$; " good!"
|
||||
i =i +1
|
||||
loop until 1 =2
|
||||
AList=ListCreate()
|
||||
|
||||
end
|
||||
'Add items to the list.
|
||||
DEF X:INT
|
||||
|
||||
FOR X=0 TO 10
|
||||
POINTER Temp=ListAdd(AList,NEW(INT,1))
|
||||
#<INT>temp=X
|
||||
'The hash ("#") dereferencing operator is unique to IWBASIC and Creative Basic, and
|
||||
'it is suitable for most basic pointer needs. IWBASIC also supports a "C style"
|
||||
'dereferencing operator: "*". And that will work here too.
|
||||
NEXT X
|
||||
|
||||
'A program compiled as console only does not need the commands to open and
|
||||
'close the console. However, it does not hurt to use them.
|
||||
OPENCONSOLE
|
||||
|
||||
'***Iterate the list with the "for each" loop***
|
||||
FOR Temp=EACH AList AS INT
|
||||
PRINT #Temp
|
||||
NEXT
|
||||
|
||||
PRINT
|
||||
|
||||
'A press any key to continue message is automatic in a program compiled as a console only
|
||||
program. I presume the compiler inserts the code.
|
||||
CLOSECONSOLE
|
||||
|
||||
'Because this is a console only program.
|
||||
END
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue