[Info-vax] different defaults in batch
Jake Hamby (Solid State Jake)
jake.hamby at gmail.com
Thu Nov 9 00:17:19 EST 2023
Correcting myself: I've been browsing GNAT sources, and Ada code does tend to spell things out. I found a loop with "Index" instead of "I":
if On_Windows then
-- Replace all '/' by '\'
for Index in 1 .. End_Path loop
if Path_Buffer (Index) = '/' then
Path_Buffer (Index) := Directory_Separator;
end if;
end loop;
The same file also has "for J in", so I guess the author wasn't completely opposed to the idea. I thought "i" standing for "index" was kind of funny, and very Ada. Another example of spelling things out, Ada-style:
type File_Descriptor is new Integer;
-- Corresponds to the int file handle values used in the C routines
Standin : constant File_Descriptor := 0;
Standout : constant File_Descriptor := 1;
Standerr : constant File_Descriptor := 2;
-- File descriptors for standard input output files
Invalid_FD : constant File_Descriptor := -1;
-- File descriptor returned when error in opening/creating file
Null_FD : constant File_Descriptor := -2;
-- Uninitialized file descriptor
procedure Close (FD : File_Descriptor; Status : out Boolean);
It's not "stdin". It's "Standin".
Regards,
Jake Hamby
More information about the Info-vax
mailing list