Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
27
Task/Input-loop/Bracmat/input-loop.bracmat
Normal file
27
Task/Input-loop/Bracmat/input-loop.bracmat
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
( put$("This is
|
||||
a three line
|
||||
text","test.txt",NEW)
|
||||
& fil$("test.txt",r)
|
||||
& fil$(,STR," \t\r\n")
|
||||
& 0:?linenr
|
||||
& whl
|
||||
' ( fil$:(?line.?breakchar)
|
||||
& put
|
||||
$ ( str
|
||||
$ ( "breakchar:"
|
||||
( !breakchar:" "&SP
|
||||
| !breakchar:\t&"\\t"
|
||||
| !breakchar:\r&"\\r"
|
||||
| !breakchar:\n&"\\n"
|
||||
| !breakchar:&EOF
|
||||
)
|
||||
", word "
|
||||
(1+!linenr:?linenr)
|
||||
":"
|
||||
!line
|
||||
\n
|
||||
)
|
||||
)
|
||||
)
|
||||
& (fil$(,SET,-1)|out$"file closed")
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue