Re: [fpc-pascal]Read from command line

2003-09-07 Thread James Mills
On Sun, Sep 07, 2003 at 09:43:32PM +1000, DONALD PEDDER wrote: >Don't know if it's different in Linux, but in the DOS version at least > you can use paramstr(1), paramstr(2), etc. > > if (paramstr(1)='test') then writenln('you passed the parameter passing > test') It isn't any different on Li

Re: [fpc-pascal]Read from command line

2003-09-07 Thread DONALD PEDDER
> myprogram param1 param2 > > made those two variables available to the program and you could do some > action, just like passing variables to a function. > > How do you do that in FPC in Linux? Don't know if it's different in Linux, but in the DOS version at least you can use paramstr(1), para

Re: [fpc-pascal]Read from command line

2003-09-07 Thread Olaf Leidinger
Hi again! Sorry, it has to be: for i := 0 to argc-1 do argc is the number of arguments, argv is a string-vector. I think it is an array of c-strings, isn't it? Ciao, Olaf ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.or

Re: [fpc-pascal]Read from command line

2003-09-07 Thread Olaf Leidinger
Hi Paul! > How do you do that in FPC in Linux? > You can use something like this: program argtest; var i: integer; begin for i := 0 to argc do begin writeln (argv[i]); end; end. Ciao, Olaf ___ fpc-pascal maillist - [EMAIL