Loops/While: Difference between revisions
Content added Content deleted
m (→Icon and Unicon: header simplification) |
|||
Line 837: | Line 837: | ||
<lang trith>1024 [dup print 1 shr] [dup 0 >] while drop</lang> |
<lang trith>1024 [dup print 1 shr] [dup 0 >] while drop</lang> |
||
=={{header|TUSCRIPT}}== |
|||
<lang tuscript> |
|||
$$ MODE TUSCRIPT |
|||
i=1024 |
|||
LOOP |
|||
PRINT i |
|||
i=i/2 |
|||
IF (i==0) EXIT |
|||
ENDLOOP |
|||
</lang> |
|||
Output: |
|||
<pre> |
|||
1024 |
|||
512 |
|||
256 |
|||
128 |
|||
64 |
|||
32 |
|||
16 |
|||
8 |
|||
4 |
|||
2 |
|||
1 |
|||
</pre> |
|||
=={{header|Unicon}}== |
=={{header|Unicon}}== |
||
See [[#Icon|Icon]]. |
See [[#Icon|Icon]]. |