home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
p3_1bs.seq
< prev
next >
Wrap
Text File
|
1990-04-03
|
699b
|
27 lines
\ Comp 462
\ Balraj Sidhu Set: 14D4
\ Date: April 3, 1990
\ Problem 3.1
\ print double numbers on the stack
: .sd ( -- )
depth ?dup if
0 ?do depth i - 1- pick
depth i - 2- pick
d. 8 emit \ back up one space
ascii . emit \ indicate double word
2 +loop
else ." Empty" then ;
\ print all single numbers on the stack
: .ss ( -- )
depth ?dup if
0 ?do depth i - 1- pick
. 8 emit \ back up one space
loop
else ." Empty" then ;