Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro or Evaluate?
Message
From
21/09/2018 06:44:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01662147
Message ID:
01662183
Views:
46
>First, thank you. Your approach should work and should be my solution. But I have changed the TEXT TO ENDTEXT to a string (because I will store it in the app object). So in my case I have
>
> cExpr = "<<tcAliasName>>.INSTOCK + <<tcAliasName>>.ONORDER - <<tcAliasName>>.REORDERPNT"
>nQty = EVALUATE( cExpr ) 
>
>
>But I get error Missing Operand. I must be doing something wrong. I will keep checking my syntax.
>
>UPDATE. The error is actually Missing Expression, not Operand.
  cExpr =textmerge( "<< m.tcAliasName >>.INSTOCK + << m.tcAliasName >>.ONORDER - << m.tcAliasName >>.REORDERPNT")
  nQty = EVALUATE( m.cExpr ) 
Or without merging (merging is nice BTW):
  cExpr = m.tcAliasName + ".INSTOCK + " +  m.tcAliasName + ".ONORDER - " + m.tcAliasName +".REORDERPNT"
  nQty = EVALUATE( m.cExpr ) 
(Without text merging it is a bit obscure using operands)
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform