Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this an integer ?
Message
From
05/03/1999 09:26:59
 
 
To
05/03/1999 08:14:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00194389
Message ID:
00194420
Views:
17
>I kow that with the type() function i am able to see if is a
>
>Character returning C
>Numeric (also float, double, and integer) returning N
>Currency returning Y
>Date returning D
>DateTime returning T
>Logical returning L
>Memo returning M
>Object returning O
>General returning G
>Screen (created with SAVE SCREEN) returning S
>
>my variable is an integer value
>so the type function is returning me 'N'
>but i want to know also if it is a numeric
>or a integer
>
>like this
>do case
>case type(mvariable) ='N'
>if mvariable = integer then
>else
>action
>endif
>
>can you please help me out ,
>

Try (INT(mVariable)==mVariable) to see if something is an integer once you know it's numeric - it doesn't work for some very large positove and negative numbers that are forced to be represented using a floating point value that doesn't have an exact integer representation, but that probably won't come up very often.

>David
>from (we walk on wooden shoes) holland
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform