Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine if there is any decimal value
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01300570
Message ID:
01300576
Vues:
19
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform