Loops/Foreach: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 349: | Line 349: | ||
==={{header|IWBASIC}}=== |
==={{header|IWBASIC}}=== |
||
⚫ | |||
<lang IWBASIC> |
<lang IWBASIC>DEF AList:POINTER |
||
⚫ | |||
DEF AList:POINTER |
|||
AList=ListCreate() |
AList=ListCreate() |
||
Line 373: | Line 371: | ||
'***Iterate the list with the "for each" loop*** |
'***Iterate the list with the "for each" loop*** |
||
FOR Temp=EACH AList AS INT |
FOR Temp=EACH AList AS INT |
||
⚫ | |||
⚫ | |||
NEXT |
NEXT |
||
Line 385: | Line 381: | ||
'Because this is a console only program. |
'Because this is a console only program. |
||
END |
END</lang> |
||
'''An Array''' |
|||
⚫ | |||
⚫ | |||
AnArray=0,1,2,3,4,5,6,7,8,9,10 |
AnArray=0,1,2,3,4,5,6,7,8,9,10 |
||
Line 396: | Line 391: | ||
FOR X=0 TO 10 |
FOR X=0 TO 10 |
||
PRINT AnArray[X] |
PRINT AnArray[X] |
||
NEXT X |
NEXT X |
||