thanks, Val worked nicely =)
--
Felipe Monteiro de Carvalho
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On Sun, 23 Nov 2008, Graeme Geldenhuys wrote:
> On Sun, Nov 23, 2008 at 6:23 PM, Johann Glaser <[EMAIL PROTECTED]> wrote:
> > Always avoid exceptions if possible, since they are very costly in terms
> > CPU time.
>
> I know this was the rule of thumb in Delphi 5-7 days... Does this
> still appl
On Sun, Nov 23, 2008 at 6:23 PM, Johann Glaser <[EMAIL PROTECTED]> wrote:
> Always avoid exceptions if possible, since they are very costly in terms
> CPU time.
I know this was the rule of thumb in Delphi 5-7 days... Does this
still apply today, with newer compilers and much faster CPU's? Just
cu
On Sun, 23 Nov 2008, Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I would like to verify if a string is a valid number, as in StrToInt
> will work when applied to it. The obvious way is making a try
> statement:
>
> try
> StrToInt(TokenStr);
> AdicionarToken(tNumeroLit
Hi!
Am Sonntag, den 23.11.2008, 14:18 -0200 schrieb Felipe Monteiro de
Carvalho:
> Hello,
>
> I would like to verify if a string is a valid number, as in StrToInt
> will work when applied to it. The obvious way is making a try
> statement:
>
> try
> StrToInt(TokenStr);
> Ad
Have a look at TryStrToInt.
- Original Message -
From: "Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]>
To: "FPC-Pascal users discussions"
Sent: Sunday, November 23, 2008 5:18 PM
Subject: [fpc-pascal] Verify if string is a valid number
It's easy to
Hello,
I would like to verify if a string is a valid number, as in StrToInt
will work when applied to it. The obvious way is making a try
statement:
try
StrToInt(TokenStr);
AdicionarToken(tNumeroLiteral, TokenStr);
except
AdicionarToken(tId, TokenStr);
en