Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using #defined constant as string
Message
 
To
21/11/2005 14:44:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01070862
Message ID:
01070895
Views:
20
#define d_sum price*d_quantity

SELECT 2*d_sum+1000 as hello FROM invoice

>>#define d_sum price*d_quantity as hello
>
>I'm sorry. The sample code was too simplified. I need to use d_sum inside expressions in SELECT statement.
>Real code where I tried your suggeston was
>
>
CREATE CURSOR invoice ( price N(12,2), quantity N(2), packing N(2))
>
>#define d_quantity quantity*packing
>#define d_sum price*d_quantity as hello
>
>SELECT 2*d_sum+1000 FROM invoice
>
>but this causes syntax error in select line
Previous
Reply
Map
View

Click here to load this message in the networking platform