Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Epson FX800 - Bold
Message
From
03/08/2001 08:43:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00539294
Message ID:
00539326
Views:
8
>Thank you very much
>
> Moisés

You're welcome.

I do hope, though, that you start using #DEFINE and #INCLUDE.

For instance, take a look at #PC_RESET. I use this before I print any report, to reset the printer to a "known state". If I later find out I have to add something here, I add it - but I don't have to change every report that uses it. I do have to recompile, though - #DEFINEs are evaluated at compile time.

BTW, if you have to print to two or more different printers (that use different codes), you may consider changing the #DEFINEs to variables.


Additional examples of #DEFINE:
#DEFINE TRUE .T.

MyValue = TRUE



* Exclusive OR
#DEFINE XOR #

if (empty(a)) XOR (empty(b))



* Carriage return + line feed; combination required in some cases instead of chr(13)
#define CRLF chr(13) + chr(10)

wait window "Hello" + CRLF + "How are you?"
In every case, in actual practice I have the #DEFINE in an include file.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform