[fpc-pascal] It is possible to pass command line to pascal

Rainer Stratmann rainerstratmann at t-online.de
Sun Jun 30 11:41:50 CEST 2013


 On Sunday 30 June 2013 00:59:59 you wrote:
> I Tried, but only return an integer not a string value.

Thats right.

You have to put the result in a file and then afterwards read the file.

ls uname -r > file.txt

The integer is the result code of the execution.
It contains information if the execution was successful.
 
> On 6/29/13, Rainer Stratmann <rainerstratmann at t-online.de> wrote:
> >  On Saturday 29 June 2013 23:24:44 you wrote:
> >> Yes
> > 
> > It is possible.
> > 
> > http://www.freepascal.org/docs-html/rtl/unix/fpsystem.html
> > 
> >> On Sat, Jun 29, 2013 at 10:42 PM, Rainer Stratmann <
> >> 
> >> rainerstratmann at t-online.de> wrote:
> >> >  On Saturday 29 June 2013 22:40:21 you wrote:
> >> > > On 29.06.2013 21:27, Johan Tu Toit wrote:
> >> > > > Hi all,
> >> > > > 
> >> > > > It is possible to pass command line to pascal:
> >> > > > Example:
> >> > > > ls uname -r
> >> > > 
> >> > > You can pass parameters to any program. But maybe your question is
> >> > > more
> >> > > like "how do I access these parameters?". To answer this, please
> >> > > take a
> >> > > look at the documentation:
> >> > > http://www.freepascal.org/docs-html/rtl/system/paramstr.html
> >> > > http://www.freepascal.org/docs-html/rtl/system/paramcount.html
> >> > 
> >> > May be he means to execute a command in a shell. ?
> >> > _______________________________________________
> >> > fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> >> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> > 
> > _______________________________________________
> > fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal 



More information about the fpc-pascal mailing list