Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine if there is any decimal value
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01300570
Message ID:
01300576
Views:
18
Given a number value, is there a function to determine if there are any to the right of the decimal place?

Off the top of my head and untested:
lcNumber = ALLTRIM( STR( lnNumber ) )
lcDecimals = GETWORDNUM( lcNumber, 2, "." )
IF NOT EMPTY( lcDecimals )
  lnDecimals = VAL( lcDecimals )
  IF NOT EMPTY( lnDecimals )
    *** There is a decimal value
  ENDIF
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform