September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
24
Task/Loops-While/IWBASIC/loops-while.iwbasic
Normal file
24
Task/Loops-While/IWBASIC/loops-while.iwbasic
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
DEF X:INT
|
||||
|
||||
X=1024
|
||||
|
||||
OPENCONSOLE
|
||||
|
||||
WHILE X>0
|
||||
|
||||
PRINT X
|
||||
X=X/2
|
||||
|
||||
ENDWHILE
|
||||
'Output starts with 1024 and ends with 1.
|
||||
|
||||
'Putting the following in the loop will produce output starting with 512 and ending with 0:
|
||||
'X=X/2
|
||||
'PRINT X
|
||||
|
||||
'When compiled as a console only program, a press any key to continue message is automatic.
|
||||
'I presume code is added by the compiler.
|
||||
CLOSECONSOLE
|
||||
|
||||
'Since this is, in fact, an IWBASIC console program, which compiles and runs.
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue