Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB/VC H-File to a VFP H-File
Message
 
 
To
27/09/1998 13:04:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00141225
Message ID:
00141266
Views:
19
>>Those are logical ORs; you can do the same thing with numerical values in VFP with addition, assuming that the bits involved do not have overlapping power of two values. For your examples,
>>
>>
>>#DEFINE PTR_S_JOURNAL 1
>>#DEFINE PTR_S_RECEIPT 2
>>#DEFINE PTR_S_SLIP 4
>>
>>#DEFINE PTR_S_JOURNAL_RECEIPT PTR_S_JOURNAL + PTR_S_RECEIPT && 3
>>#DEFINE PTR_S_JOURNAL_SLIP PTR_S_JOURNAL + PTR_S_SLIP && 5
>>#DEFINE PTR_S_RECEIPT_SLIP PTR_S_RECEIPT + PTR_S_SLIP && 6
>>

>
>There is also the bitor() function:
>
>
>#DEFINE PTR_S_JOURNAL_RECEIPT bitor(PTR_S_JOURNAL, PTR_S_RECEIPT) && 3
>#DEFINE PTR_S_JOURNAL_SLIP    bitor(PTR_S_JOURNAL, PTR_S_SLIP)    && 5
>#DEFINE PTR_S_RECEIPT_SLIP    bitor(PTR_S_RECEIPT, PTR_S_SLIP)    && 6
>
Much Thanks!
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform