Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting size of variable
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Getting size of variable
Miscellaneous
Thread ID:
00364795
Message ID:
00364795
Views:
54
Hi everyone,

Is there a function to determine size of variable? Today I had a numeric overflow Error, so I was thinking, is it possible to find a size (or number of digits) in Numeric variable.
I finally got it working in this code:
if !empty(pnSize) and vartype(pnSize)='N'
    lnMax=val(replicate('9',pnSize-1))
     if lnLotSizeSqFt>lnMax
          lnLotSizeSqFt=lnMax
     endif
endif
there pnSize is a parameter (actual field size). But how can I determine size of variable?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform