User input/Text: Difference between revisions

Line 229:
Note that NUMBER? always leaves a double result on the stack.
INPUT# returns a single precision number. If you desire a double precision result, remove the NIP.
 
{{works with|4tH}}
<lang forth>: input#
begin
refill drop bl parse-word ( a n)
number error? ( n f)
while ( n)
drop ( --)
repeat ( n)
;</lang>
 
Here is an example that puts it all together:
374

edits