Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Better way to do int(val(alltrim(cvar)))?
Message
De
06/06/1998 23:20:01
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00105555
Message ID:
00105578
Vues:
30
I don't believe you have to do the alltrim.
cVar = '94567 '
nVar = INT(VAL(cVar))

If you were doing a whole series you could:

lnDecimals = SET([DECIMALS])
SET DECIMALS TO 0

nVar1 = VAL(cVar1)
nVar2 = VAL(cVar2)
nVar3 = VAL(cVar3)
nVar4 = VAL(cVar4)
nVar5 = VAL(cVar5)
nVar6 = VAL(cVar6)
nVar7 = VAL(cVar7)
nVar8 = VAL(cVar8)

SET DECIMALS TO lnDecimals

======================================
>Is there a Better way to do int(val(alltrim(cvar)))?, as in:
>
>cvar = '94567 '
>nvar = 'int(val(alltrim(cvar)))'
>
>Thanks,
>
>
>Gil
----------------------------------
-myron kirby (mkirby2000@gmail.com)-
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform