Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Input-loop/LIL/input-loop.lil
Normal file
18
Task/Input-loop/LIL/input-loop.lil
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# canread test (note that canread is not available in LIL/FPLIL itself
|
||||
# but provided by the command line interfaces in main.c/lil.pas)
|
||||
#
|
||||
# You can either call this and enter lines directly (use Ctrl+Z/Ctrl+D
|
||||
# to finish) or a redirect (e.g. lil canread.lil < somefile.txt)
|
||||
#
|
||||
# Normally this is how you are supposed to read multiple lines from
|
||||
# the standard input using the lil executable. For an alternative way
|
||||
# that uses error catching via try see the eoferror.lil script.
|
||||
#
|
||||
|
||||
set count 0
|
||||
while {[canread]} {
|
||||
readline
|
||||
inc count
|
||||
}
|
||||
print $count lines
|
||||
Loading…
Add table
Add a link
Reference in a new issue