Re: [fpc-pascal] ReadStr/WriteStr vs Val/Str

2010-10-19 Thread Jonas Maebe

On 19 Oct 2010, at 01:56, Richard Ward wrote:

> As a user of the old Macintosh Pascal (later THINK Pascal),  both ReadStr and 
> WriteStr functions were included and I used them quite a bit.   The names 
> were different but the FPC implementation is basically the same as far as I 
> can tell.
> 
> Besides backward compatibility, portability issues and personal preference, 
> is there any functionality Val and Str may have that ReadStr and WriteStr 
> don't?  I can't see any, but wanted to make sure there there were no subtle 
> technical issue(s) I might need to consider.

readstr gives a run time error when you try to read an invalid number, while 
val() returns an error in the last parameter. Other than that, they all use the 
same helper routines to perform the actual conversions.


Jonas___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] ReadStr/WriteStr vs Val/Str

2010-10-18 Thread Richard Ward
As a user of the old Macintosh Pascal (later THINK Pascal),  both ReadStr and 
WriteStr functions were included and I used them quite a bit.   The names were 
different but the FPC implementation is basically the same as far as I can tell.

Besides backward compatibility, portability issues and personal preference, is 
there any functionality Val and Str may have that ReadStr and WriteStr don't?  
I can't see any, but wanted to make sure there there were no subtle technical 
issue(s) I might need to consider.

Thank you for implementing these functions.  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal