RosettaCodeData/Task/User-input-Text/Pop11/user-input-text.pop11

10 lines
276 B
Text
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
;;; Setup item reader
lvars itemrep = incharitem(charin);
lvars s, c, j = 0;
;;; read chars up to a newline and put them on the stack
while (charin() ->> c) /= `\n` do j + 1 -> j ; c endwhile;
;;; build the string
consstring(j) -> s;
;;; read the integer
lvars i = itemrep();