home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
p3_2dc.seq
< prev
next >
Wrap
Text File
|
1990-04-03
|
608b
|
28 lines
\ PROGRAM FOR PROBLEM 3.2
\
: .SDD ( -- )
DEPTH ?DUP IF
0 ?DO DEPTH I - 1- PICK
DEPTH I - 2- PICK
D. 8 EMIT
ASCII . EMIT
2 +LOOP
ELSE ." Empty" THEN ;
: .SS ( -- )
DEPTH ?DUP IF
0 ?DO DEPTH I - 1- PICK
. \ OUTPUT VALUE
LOOP
ELSE ." Empty" THEN ;
: .SD ( -- )
DEPTH 2 MOD IF
.SS
ELSE
.SDD
THEN ;