Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using #defined constant as string
Message
From
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:
01070889
Views:
16
>#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
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform