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,29 +0,0 @@
with Ada.Text_IO; use Ada.Text_IO;
procedure Rosetta_Read is
File : File_Type;
begin
Open (File => File,
Mode => In_File,
Name => "rosetta_read.adb");
Set_Line (File, To => 7);
declare
Line_7 : constant String := Get_Line (File);
begin
if Line_7'Length = 0 then
Put_Line ("Line 7 is empty.");
else
Put_Line (Line_7);
end if;
end;
Close (File);
exception
when End_Error =>
Put_Line ("The file contains fewer than 7 lines.");
Close (File);
when Storage_Error =>
Put_Line ("Line 7 is too long to load.");
Close (File);
end Rosetta_Read;

View file

@ -1,9 +1,6 @@
@echo off
for /f "skip=6 tokens=*" %%i in (file.txt) do (
set line7=%%i
goto break
setlocal enableextensions
for /f skip^=6^ tokens^=*^ delims^=^ eol^= %%a in (%1) do (
echo(%%a
goto:eof
)
:break
echo Line 7 is: %line7%
pause>nul

View file

@ -1,6 +1,6 @@
nthLine[filename, lineNum] :=
{
line = nth[lines[filenameToURL[filename]], lineNum-1]
line = nth1[lines[filenameToURL[filename]], lineNum]
if line != undef
return line
else

View file

@ -1,7 +0,0 @@
$file = Get-Content c:\file.txt
if ($file.count -lt 7)
{Write-Warning "The file is too short!"}
else
{
$file | Where Readcount -eq 7 | set-variable -name Line7
}

View file

@ -1,2 +0,0 @@
line: pick read/lines %file.txt 7
print any [line "No seventh line"]

View file

@ -1,18 +0,0 @@
Function read_line(filepath,n)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(filepath,1)
arrLines = Split(objFile.ReadAll,vbCrLf)
If UBound(arrLines) >= n-1 Then
If arrLines(n-1) <> "" Then
read_line = arrLines(n-1)
Else
read_line = "Line " & n & " is null."
End If
Else
read_line = "Line " & n & " does not exist."
End If
objFile.Close
Set objFSO = Nothing
End Function
WScript.Echo read_line("c:\temp\input.txt",7)