for numbers and dates, there are some delphi functions like DateSeperator
I THINK its called off hand that you should use.
i.e. StrToDate('10'+DateSeperator+'10'+DateSeperator+'2003');
I cant remember if its IS actually called DateSeperator, but if its not
it will be something like that.
There is also one for number seperator also.
HTH.
Jeremy
-----Original Message-----
From: "Paul Mckenzie" <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Thu, 2 Oct 2003 10:43:16 +1200
Subject: Re: [DUG]: Spanish Problem
> Possible - Some languages use "," instead of "." for the decimal point.
>
> HTH
>
> Regards
> Paul McKenzie
> Analyst Programmer
> SMSS Ltd.
>
> ----- 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/
---------------------------------------------------------------------------
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/