Input loop: Difference between revisions
Content added Content deleted
m (Add 'i' implementation.) |
No edit summary |
||
Line 1,345: | Line 1,345: | ||
table.insert(lines, line) -- add the line to the list of lines |
table.insert(lines, line) -- add the line to the list of lines |
||
end</lang> |
end</lang> |
||
=={{header|M2000 Interpreter}}== |
|||
<lang M2000 Interpreter> |
|||
Document A$={1st Line |
|||
2nd line |
|||
3rd line |
|||
} |
|||
Save.Doc A$, "test.txt", 0 ' 0 for utf16-le |
|||
\\ we use Wide for utf16-le \\ without it we open using ANSI |
|||
Open "test.txt" For Wide Input as #N |
|||
While Not Eof(#N) { |
|||
Line Input #N, ThisLine$ |
|||
Print ThisLine$ |
|||
} |
|||
Close #N |
|||
Clear A$ |
|||
Load.Doc A$, "test.txt" |
|||
\\ print proportional text, all lines |
|||
Report A$ |
|||
\\ Print one line, non proportional |
|||
\\ using |
|||
For i=0 to Doc.par(A$)-1 |
|||
Print Paragraph$(A$, i) |
|||
Next i |
|||
\\ List of current variables (in any scope, public only) |
|||
List |
|||
</lang> |
|||
=={{header|Maple}}== |
=={{header|Maple}}== |