| Star Trek by Krishna Myneni |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.forth · Group Profile
Author: The Beez'The Beez' Date: Sep 19, 2008 07:58
Krishna,
Are you SURE this is correct? I think this goes out of bounds for the
n{ array!
---8<---
3 INTEGER array n{
: LongRangeSensors ( -- )
d{ 3 } f@ f0< IF
cr ." LONG RANGE SENSORS ARE INOPERABLE"
ELSE
cr ." LONG RANGE SCAN FOR QUADRANT " q1 ? ." ," q2 ?
cr ." ------------" cr
q1 @ 2 + q1 @ 1- DO
-1 n{ 1 } !
-2 n{ 2 } !
-3 n{ 3 } !
---8<---
Hans Bezemer
|