Glen Boyd wrote:

> You original message had floating point numbers in the test.
> Val requires
> sTemp (in your example) to be a whole number.  Does this
> still meet with
> your need?  You will error out on floating point numerics?

You're right, I haven't tested it with floats yet, but according to the help
file:

procedure Val(S; var V; var Code: Integer);
where
"S is a string-type expression; it must be a sequence of characters that
form a signed real number
V is an integer-type or real-type variable"
and
"The generic type Real, in its current implementation, is equivalent to
Double"

So I assumed it would work with doubles as well as with integers.
Please correct me if I'm wrong.

I should've removed a boolean that tells me whether the value is integer or
double since I'm only interested to find out whether it's a numeric value,
so that i can perform additions on it. My fault.

Thank you,
Sergei Stenkov

---------------------------------------------------------------------------
    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"

Reply via email to