home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
sstack.seq
< prev
next >
Wrap
Text File
|
1988-11-04
|
656b
|
18 lines
\ HERE ARE THE MODIFICATIONS TO .SD REQUIRED SO THAT IT WILL
\ DISPLAY SINGLE NUMBERS. I HAVE COMMENTED OUT THE PARTS OF
\ .SD THAT ARE NOT REQUIRED.
\ This stack print will print double numbers that are on the stack.
\ If there is an odd number of numbers on the stack or if the stack
\ has a mixed combination of singles and doubles you are likely to
\ get confusing results.
\ : .SD ( -- )
: .SS ( -- )
DEPTH ?DUP IF
0 ?DO DEPTH I - 1- PICK
( DEPTH I - 2- PICK )
. ( D. 8 EMIT ASCII . EMIT )
( 2 +) LOOP
ELSE ." Empty" THEN ;