September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
15
Task/Input-loop/BASIC/input-loop-3.basic
Normal file
15
Task/Input-loop/BASIC/input-loop-3.basic
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
100 PROGRAM "Type.bas"
|
||||
110 TEXT 80
|
||||
120 INPUT PROMPT "File name: ":F$
|
||||
130 WHEN EXCEPTION USE IOERROR
|
||||
140 OPEN #1:F$ ACCESS INPUT
|
||||
150 DO
|
||||
160 LINE INPUT #1,IF MISSING EXIT DO:F$
|
||||
170 PRINT F$
|
||||
180 LOOP
|
||||
190 CLOSE #1
|
||||
200 END WHEN
|
||||
210 HANDLER IOERROR
|
||||
220 PRINT EXSTRING$(EXTYPE)
|
||||
230 END
|
||||
240 END HANDLER
|
||||
11
Task/Input-loop/BASIC/input-loop-4.basic
Normal file
11
Task/Input-loop/BASIC/input-loop-4.basic
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
100 PROGRAM "Type.bas"
|
||||
110 INPUT PROMPT "File name: ":F$
|
||||
120 WHEN EXCEPTION USE IOERROR
|
||||
130 OPEN #1:F$
|
||||
140 COPY FROM #1 TO #0
|
||||
150 CLOSE #1
|
||||
160 END WHEN
|
||||
170 HANDLER IOERROR
|
||||
180 PRINT EXSTRING$(EXTYPE)
|
||||
190 CLOSE #1
|
||||
200 END HANDLER
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import system'routines.
|
||||
import system'io.
|
||||
import extensions'routines.
|
||||
import system'routines;
|
||||
import system'io;
|
||||
import extensions'routines;
|
||||
|
||||
program =
|
||||
[
|
||||
ReaderEnumerator new(File new:"file.txt"); forEach:printingLn.
|
||||
].
|
||||
public program()
|
||||
{
|
||||
ReaderEnumerator.new(File.assign:"file.txt").forEach(printingLn)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import system'io.
|
||||
import system'io;
|
||||
|
||||
program =
|
||||
[
|
||||
var reader := File new:"file.txt"; textreader.
|
||||
while (reader available)
|
||||
[
|
||||
console writeLine(reader readLiteral).
|
||||
].
|
||||
].
|
||||
public program()
|
||||
{
|
||||
var reader := File.assign:"file.txt".textreader();
|
||||
while (reader.Available)
|
||||
{
|
||||
console.writeLine(reader.readLine())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
7
Task/Input-loop/OCaml/input-loop-4.ocaml
Normal file
7
Task/Input-loop/OCaml/input-loop-4.ocaml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
let rec input_caller () =
|
||||
let input = read_line() in
|
||||
your_function input ;
|
||||
input_caller() ;
|
||||
;;
|
||||
|
||||
let () = input_caller()
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
/*REXX program reads from the (console) default input stream until null*/
|
||||
|
||||
do until _==''
|
||||
parse pull _
|
||||
end /*until ...*/
|
||||
exit /*stick a fork in it, we're done.*/
|
||||
end /*until*/ /*stick a fork in it, we're done.*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
/*REXX program reads from the (console) default input stream until null*/
|
||||
|
||||
do until _==''
|
||||
_=linein()
|
||||
end /*until ...*/
|
||||
exit /*stick a fork in it, we're done.*/
|
||||
_= linein()
|
||||
end /*until*/ /*stick a fork in it, we're done.*/
|
||||
|
|
|
|||
10
Task/Input-loop/VBA/input-loop.vba
Normal file
10
Task/Input-loop/VBA/input-loop.vba
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Public Sub test()
|
||||
Dim filesystem As Object, stream As Object, line As String
|
||||
Set filesystem = CreateObject("Scripting.FileSystemObject")
|
||||
Set stream = filesystem.OpenTextFile("D:\test.txt")
|
||||
Do While stream.AtEndOfStream <> True
|
||||
line = stream.ReadLine
|
||||
Debug.Print line
|
||||
Loop
|
||||
stream.Close
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue