Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,18 +0,0 @@
with Ada.Text_Io; use Ada.Text_Io;
procedure Read_Stream is
Line : String(1..10);
Length : Natural;
begin
while not End_Of_File loop
Get_Line(Line, Length); -- read up to 10 characters at a time
Put(Line(1..Length));
-- The current line of input data may be longer than the string receiving the data.
-- If so, the current input file column number will be greater than 0
-- and the extra data will be unread until the next iteration.
-- If not, we have read past an end of line marker and col will be 1
if Col(Current_Input) = 1 then
New_Line;
end if;
end loop;
end Read_Stream;

View file

@ -1 +0,0 @@
for /f %%i in (file.txt) do if %%i@ neq @ echo %%i

View file

@ -1,33 +0,0 @@
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.

View file

@ -2,7 +2,7 @@ import system'routines;
import system'io;
import extensions'routines;
public program()
public Program()
{
ReaderEnumerator.new(File.assign("file.txt")).forEach(printingLn)
ReaderEnumerator.new(File.assign("file.txt")).forEach(PrintingLn)
}

View file

@ -6,7 +6,7 @@ public program()
{
while (reader.Available)
{
console.writeLine(reader.readLine())
Console.writeLine(reader.readLine())
}
}
}

View file

@ -1,10 +0,0 @@
procedure process_line_by_line(integer fn)
object line
while 1 do
line = gets(fn)
if atom(line) then
exit
end if
-- process the line
end while
end procedure

View file

@ -1,4 +0,0 @@
Get-Content c:\file.txt |
ForEach-Object {
$_
}

View file

@ -1 +0,0 @@
ForEach-Object -inputobject (get-content c:\file.txt) {$_}

View file

@ -1,21 +0,0 @@
REBOL [
Title: "Basic Input Loop"
URL: http://rosettacode.org/wiki/Basic_input_loop
]
; Slurp the whole file in:
x: read %file.txt
; Bring the file in by lines:
x: read/lines %file.txt
; Read in first 10 lines:
x: read/lines/part %file.txt 10
; Read data a line at a time:
f: open/lines %file.txt
while [not tail? f][
print f/1
f: next f ; Advance to next line.
]
close f

View file

@ -1,3 +0,0 @@
do while stream(stdin, "State") <> "NOTREADY"
call charout ,charin(stdin)
end

View file

@ -1,4 +0,0 @@
Do Until input=''
input=linein(stdin)
Call lineout ,input
End

View file

@ -1,5 +0,0 @@
/* -- AREXX -- */
do until eof(stdin)
l = readln(stdin)
say l
end

View file

@ -1,4 +0,0 @@
/*REXX program reads from the (console) default input stream until null*/
do until _==''
parse pull _
end /*until*/ /*stick a fork in it, we're done.*/

View file

@ -1,4 +0,0 @@
/*REXX program reads from the (console) default input stream until null*/
do until _==''
_= linein()
end /*until*/ /*stick a fork in it, we're done.*/

View file

@ -1,12 +0,0 @@
filepath = "SPECIFY PATH TO TEXT FILE HERE"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objInFile = objFSO.OpenTextFile(filepath,1,False,0)
Do Until objInFile.AtEndOfStream
line = objInFile.ReadLine
WScript.StdOut.WriteLine line
Loop
objInFile.Close
Set objFSO = Nothing