Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
From
25/10/2006 11:48:49
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164430
Views:
8
>Hi,
>>
>>= MESSAGEBOX( "There is no disk in the selected drive.  Please ensure that there is a disk in the drive" + CHR(13) + ;
>>              "reselect the 'Save Changes' Checkbox and click 'Execute' again.  The process will continue" + CHR(13) + ;
>>              "from where you left off", 16, "No Disk in Drive")
>>
>>= MESSAGEBOX( ERR_MESS_NO_DISK, MB_ICONSTOP, "No Disk in Drive")
>>
>So why not:
>
>#DEFINE NO_DISK_MSG  = MESSAGEBOX( "There is no disk in the selected drive.  Please ensure that there is a disk in the drive" + CHR(13) + ;
>              "reselect the 'Save Changes' Checkbox and click 'Execute' again.  The process will continue" + CHR(13) + ;
>              "from where you left off", 16, "No Disk in Drive")
>
>*Then just use:
>NO_DISK_MSG
>
><g>

Indeed. In fact both the ERR_MESS_NO_DISK and NO_DISK_MSG can be defined in trhe define file nicht var?

Defines can be fun:
#DEFINE if_if_if_you_stutter   ConditionsTab.Affliction = "Stammer"
#DEFINE e_e_e_endif            Endif
#DEFINE Its_cos_of_yer_nerves  = MESSAGEBOX("Patient suffers from a Nervous Condition", O_O_O_O_K, "Nervous Condition")

If if_if_if_you_stutter 
    Its_cos_of_yer_nerves 
e_e_e_endif
(not tested)
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform