program inlezen; { This software has been designed and is CopyLefted by Han de Bruijn: (===) @-O^O-@ #/_\# ### } Uses Sysutils, netwerk; var bulk,rand : string; OK : boolean; procedure Some_Help; begin Writeln('Data for resistor network'); Writeln; writeln('Syntax: [program] [I1] [I2]'); Writeln; Writeln('I1 = bulk input file name'); Writeln('I2 = voltages input file name'); end; procedure Read_Parameters(var OK : boolean); var tel : integer; begin OK := true; tel := ParamCount; if tel <> 2 then begin Some_Help; OK := false; Exit; end; bulk := ParamStr(1); rand := ParamStr(2); if not FileExists(bulk + '.txt') then begin Writeln(bulk + ': does Not exist'); OK := false; Exit; end; if not FileExists(rand + '.txt') then begin Writeln(rand + ': does Not exist'); OK := false; Exit; end; end; begin Read_Parameters(OK); if not OK then Halt; rekenen(bulk + '.txt',rand + '.txt'); end.