Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted by bfo ( 15 years ago )
-- pobranie argumentów z linii komend
if CLI.Argument_Count rem 2 /= 1 then
ERR.Raise_Exception(NotEnoughArguments'Identity, "Niepoprawne wywołanie");
else
mode := CLI.Argument(1);
if mode = "-b" then
for programCounter in 1 .. (CLI.Argument_Count-1)/2 loop
commandFileName(programCounter) := SU.To_Unbounded_String(CLI.Argument(argCounter));
logFileName(programCounter) := SU.To_Unbounded_String(CLI.Argument(argCounter+1));
ByteIO.Open(commandFile(programCounter), ByteIO.In_FIle, SU.To_String(commandFileName(programCounter)));
Create(logFile(programCounter), Out_File, SU.To_String(logFileName(programCounter)));
progLoad(programCounter) := new load(commandFile(programCounter).All, programCounter);
progExec(programCounter) := new execution(programCounter);
progExec(programCounter).run(true, logFile(programCounter), BATCH);
end loop;
elsif mode = "-s" then
commandFileName(1) := SU.To_Unbounded_String(CLI.Argument(2));
logFileName(1) := SU.To_Unbounded_String(CLI.Argument(3));
ByteIO.Open(commandFile(1), ByteIO.In_File, SU.TO_String(commandFileName(1)));
Create(logFile(1), Out_File, SU.To_String(logFileName(1)));
progLoad(1) := new load(commandFile(1), 1);
progExec(1) := new execution(1);
progExec(1).run(true, Standard_Output, SEQ);
end if;
end if;
Revise this Paste