Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Better way to do int(val(alltrim(cvar)))?
Message
From
06/06/1998 23:20:01
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00105555
Message ID:
00105578
Views:
29
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)-
Previous
Reply
Map
View

Click here to load this message in the networking platform