Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
14
Task/Input-loop/BASIC/input-loop-1.basic
Normal file
14
Task/Input-loop/BASIC/input-loop-1.basic
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
100 INPUT "FILENAME:";F$
|
||||
110 D$ = CHR$(4)
|
||||
120 PRINT D$"VERIFY"F$
|
||||
130 PRINT D$"OPEN"F$
|
||||
140 PRINT D$"READ"F$
|
||||
150 ONERR GOTO 190
|
||||
|
||||
160 GET C$
|
||||
170 PRINT CHR$(0)C$;
|
||||
180 GOTO 160
|
||||
|
||||
190 POKE 216,0
|
||||
200 IF PEEK(222) <> 5 THEN RESUME
|
||||
210 PRINT D$"CLOSE"F$
|
||||
11
Task/Input-loop/BASIC/input-loop-2.basic
Normal file
11
Task/Input-loop/BASIC/input-loop-2.basic
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
STD_INPUT_HANDLE = -10
|
||||
STD_OUTPUT_HANDLE = -11
|
||||
SYS "GetStdHandle", STD_INPUT_HANDLE TO @hfile%(1)
|
||||
SYS "GetStdHandle", STD_OUTPUT_HANDLE TO @hfile%(2)
|
||||
SYS "SetConsoleMode", @hfile%(1), 0
|
||||
*INPUT 13
|
||||
*OUTPUT 14
|
||||
REPEAT
|
||||
INPUT A$
|
||||
PRINT A$
|
||||
UNTIL FALSE
|
||||
1
Task/Input-loop/Batch-File/input-loop.bat
Normal file
1
Task/Input-loop/Batch-File/input-loop.bat
Normal file
|
|
@ -0,0 +1 @@
|
|||
for /f %%i in (file.txt) do if %%i@ neq @ echo %%i
|
||||
33
Task/Input-loop/COBOL/input-loop.cobol
Normal file
33
Task/Input-loop/COBOL/input-loop.cobol
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. input-loop.
|
||||
|
||||
ENVIRONMENT DIVISION.
|
||||
INPUT-OUTPUT SECTION.
|
||||
FILE-CONTROL.
|
||||
SELECT in-stream ASSIGN TO KEYBOARD *> or any other file/stream
|
||||
ORGANIZATION LINE SEQUENTIAL
|
||||
FILE STATUS in-stream-status.
|
||||
|
||||
DATA DIVISION.
|
||||
FILE SECTION.
|
||||
FD in-stream.
|
||||
01 stream-line PIC X(80).
|
||||
|
||||
WORKING-STORAGE SECTION.
|
||||
01 in-stream-status PIC 99.
|
||||
88 end-of-stream VALUE 10.
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
OPEN INPUT in-stream
|
||||
|
||||
PERFORM UNTIL EXIT
|
||||
READ in-stream
|
||||
AT END
|
||||
EXIT PERFORM
|
||||
END-READ
|
||||
DISPLAY stream-line
|
||||
END-PERFORM
|
||||
|
||||
CLOSE in-stream
|
||||
.
|
||||
END PROGRAM input-loop.
|
||||
4
Task/Input-loop/Deja-Vu/input-loop.djv
Normal file
4
Task/Input-loop/Deja-Vu/input-loop.djv
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
while /= :eof dup !read-line!stdin:
|
||||
!print( "Read a line: " !decode!utf-8 swap )
|
||||
drop
|
||||
!print "End of file."
|
||||
Loading…
Add table
Add a link
Reference in a new issue