Comment on Try ForthComments−colomon15yErrr... what's the word for printing the top of the stack? Or some way of getting a result back out?−Someone15y. 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)−colomon15yThanks! 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.−ikram15yFull stop/period, e.g.: 2 2 + . For a full list of words enter 'words'−rwmj15yPeriod character (with whitespace on either side).eg:10 . <return>10−pietrofmaggi15ysimply use the dot.try: 2 3 + .
Comments
Errr... what's the word for printing the top of the stack? Or some way of getting a result back out?
. 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)
Thanks! 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.
Full stop/period, e.g.:
For a full list of words enter 'words'Period character (with whitespace on either side).
eg:
10 . <return>
10
simply use the dot.
try: 2 3 + .