4 ms·
Errr... what's the word for printing the top of the stack? Or some way of getting a result back out?
by colomon 15y ago
Errr... what's the word for printing the top of the stack? Or some way of getting a result back out?
- Someone 15y ago. It does drop the top of the stack, too, though. So, to compute and print 1001, do: 7 11 13 * * . Also useful: .s non-destructively prints the stack (as does .S ; this forth does appear to be case-insensitive)
- ikram 15y agoFull stop/period, e.g.: 2 2 + . For a full list of words enter 'words'
- pietrofmaggi 15y agosimply use the dot. try: 2 3 + .
- rwmj 15y agoPeriod character (with whitespace on either side). eg: 10 . <return> 10
- colomon 15y agoThanks! I thought I'd tried . but since it clearly works I must have done something wrong the first time. I haven't done any serious Forth programming since about 1988, I must be a bit rusty.