NIL :stdin-push ( mixed $ARG , … )
Pushes values to stdin, effectively faking user input.
# :stdin-push example. :set &A &B i0 :read &A :stdin-push i69 :read &B :writeln s'A: ' $A :writeln s'B: ' $B
If user provides only one value during the first :read
call, then the second :read
call will assign i69 to &B. However, if user provides more than one value, the second :read
call will assign &B properly, as it always takes the first available value from the buffer, whereas :stdin-push
places values at end of buffer.
wikipage modified on 2014/0601/2317