Do the Spanish use the ',' for their decimal place and the '.' for their
thousands separator?
Phil
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, October 02, 2003 10:16 AM
Subject: [DUG]: Spanish Problem
> Hi, I got a simple piece of code that reads an text file with three
floating
> point values separated by tabs (no extra hidden characters)
> The first line looks like -180 -74 287.472
>
> The line Depth := trunc(StrToFloat(extractword(3,txtline,[' ',#9])));
causes
> an exception when run on a Spanish version of Windows. Fine with English.
> (Sorry dont have actual exception message available and we dont have a
> Spanish OS here)
>
> The above function extracts 287.472 which ends up as 287 in Depth
>
> Any ideas why this may fail on a Spanish OS.
> If someone has a Spanish OS and can run a test for me can they please
> contact me at [EMAIL PROTECTED] Cheers
>
> PS
> ExtractWord comes from JVCs jvStrUtils unit
>
> function ExtractWord(N: Integer; const S: string;
> const WordDelims: TCharSet): string;
> var
> I: Integer;
> Len: Integer;
> begin
> Len := 0;
> I := WordPosition(N, S, WordDelims);
> if I <> 0 then
> { find the end of the current word }
> while (I <= Length(S)) and not(S[I] in WordDelims) do begin
> { add the I'th character to result }
> Inc(Len);
> SetLength(Result, Len);
> Result[Len] := S[I];
> Inc(I);
> end;
> SetLength(Result, Len);
> end;
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/