Star Trek by Krishna Myneni
  Home FAQ Contact Sign in
comp.lang.forth only
 
Advanced search
POPULAR GROUPS

more...

 Up
Star Trek by Krishna Myneni         

Group: comp.lang.forth · Group Profile
Author: 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
18 Comments
diggit! del.icio.us! reddit!