[fpc-pascal] ParamStr(0) buggy?

Luiz Américo pascalive at bol.com.br
Fri Sep 9 04:47:03 CEST 2005


Hans-Juergen Taenzer wrote:
> Hello,
> 
> at the end of ParamStr(0) there is a wrong character.
> 
> A small testprogramm:
> 
> <---------------------------------------------------------->
> Program t1;
> var
> i : longint ;
> begin
>     Writeln( 'paramstr(0): <' + paramstr(0) + '>');
> 
>     Writeln( 'Count other Parms: ', ParamCount);
>     Writeln( 'Other Parms: ');
> 
>     For i :=1 to ParamCount do
>         Writeln ( '<' + ParamStr(i) + '>');
> end.
> 
> <---------------------------------------------------------->
> 
> The output of this programm is:
> 
> <---------------------------------------------------------->
> C:\TMP\fp_test_paramstr>t1 2 3 4
> paramstr(0): <C:\TMP\fp_test_paramstr\t1.exeL>
> Count other Parms: 3
> Other Parms:
> <2>
> <3>
> <4>
> <---------------------------------------------------------->
> 

This is fixed in fpc 2.0.1 or 2.1.1

Luiz



More information about the fpc-pascal mailing list