Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,14 +0,0 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
|
||||
procedure Line_By_Line is
|
||||
File : File_Type;
|
||||
begin
|
||||
Open (File => File,
|
||||
Mode => In_File,
|
||||
Name => "line_by_line.adb");
|
||||
While not End_Of_File (File) Loop
|
||||
Put_Line (Get_Line (File));
|
||||
end loop;
|
||||
|
||||
Close (File);
|
||||
end Line_By_Line;
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. read-file-line-by-line.
|
||||
|
||||
ENVIRONMENT DIVISION.
|
||||
INPUT-OUTPUT SECTION.
|
||||
FILE-CONTROL.
|
||||
SELECT input-file ASSIGN TO "input.txt"
|
||||
ORGANIZATION LINE SEQUENTIAL
|
||||
FILE STATUS input-file-status.
|
||||
|
||||
DATA DIVISION.
|
||||
FILE SECTION.
|
||||
FD input-file.
|
||||
01 input-record PIC X(256).
|
||||
|
||||
WORKING-STORAGE SECTION.
|
||||
01 input-file-status PIC 99.
|
||||
88 file-is-ok VALUE 0.
|
||||
88 end-of-file VALUE 10.
|
||||
|
||||
01 line-count PIC 9(6).
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
OPEN INPUT input-file
|
||||
IF NOT file-is-ok
|
||||
DISPLAY "The file could not be opened."
|
||||
GOBACK
|
||||
END-IF
|
||||
|
||||
PERFORM VARYING line-count FROM 1 BY 1 UNTIL end-of-file
|
||||
READ input-file
|
||||
DISPLAY line-count ": " FUNCTION TRIM(input-record)
|
||||
END-PERFORM
|
||||
|
||||
CLOSE input-file
|
||||
|
||||
GOBACK
|
||||
.
|
||||
|
|
@ -2,7 +2,7 @@ import system'io;
|
|||
import extensions;
|
||||
import extensions'routines;
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
File.assign("file.txt").forEachLine(printingLn)
|
||||
File.assign("file.txt").forEachLine(PrintingLn)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
constant cmd = command_line()
|
||||
constant filename = cmd[2]
|
||||
constant fn = open(filename,"r")
|
||||
integer i
|
||||
i = 1
|
||||
object x
|
||||
while 1 do
|
||||
x = gets(fn)
|
||||
if atom(x) then
|
||||
exit
|
||||
end if
|
||||
printf(1,"%2d: %s",{i,x})
|
||||
i += 1
|
||||
end while
|
||||
close(fn)
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
$reader = [System.IO.File]::OpenText($mancorfile)
|
||||
try {
|
||||
do {
|
||||
$line = $reader.ReadLine()
|
||||
if ($line -eq $null) { break }
|
||||
DoSomethingWithLine($line)
|
||||
} while ($TRUE)
|
||||
} finally {
|
||||
$reader.Close()
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
FilePath = "<SPECIFY FILE PATH HERE>"
|
||||
Set objFSO = CreateObject("Scripting.FileSystemObject")
|
||||
Set objFile = objFSO.OpenTextFile(FilePath,1)
|
||||
Do Until objFile.AtEndOfStream
|
||||
WScript.Echo objFile.ReadLine
|
||||
Loop
|
||||
objFile.Close
|
||||
Set objFSO = Nothing
|
||||
Loading…
Add table
Add a link
Reference in a new issue