Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems in using the function EVALUATE()
Message
From
14/09/2017 16:06:25
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
 
To
14/09/2017 16:02:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP3
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01654324
Message ID:
01654327
Views:
65
>>Dear All,
>>I have below codes
>>
>>m.KHour = 300
>>
>>HMF01 = "m.KHour * 1100000 / 110 "
>>HMF02 = "110000"
>>HMF03 = ""
>>
>>FOR ncounter = 1 TO 3
>>STORE EVALUATE("m.HMF" + PADL(ALLTRIM(STR(nCounter)),2,"0")) TO nValue
>>
>>? nValue
>>ENDFOR
>>How should I use the EVALUATE() function to put a numeric value in the nValue variable?
>>
>>3000000 for HMF01
>>1100000 for HMF02
>>0 for HMF03
>>
>>Thank you for guiding
>
>The best I could find is
>
m.KHour = 300
>
>HMF01 = "m.KHour * 1100000 / 110 "
>HMF02 = "110000"
>HMF03 = ""
>
>FOR ncounter = 1 TO 3
>	expr="m.HMF" + PADL(ncounter,2,"0")
>	STORE evaluate(expr) TO nValue
>	? ncounter, nValue, evaluate(nvalue)
>ENDFOR
>
>but it fails on 3rd, i.e. eval("") gives an error.


Thanks,
Yes . Exactly this is My problem.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform