Logical Result

Cecil

19+ years progress programming and still learning.
I have just found out that I've being doing things the hard way. I never realised that you can change the result value when converting a logical to string.

I always thought STRING(logical) => yes/no.

I checked the manual and there is no mention of converting logical values into string value using the your own format.

Sorry if I am teaching you to suck eggs but I thought that I'll share what I have found.

Code:
DEFINE VARIABLE lg AS LOGICAL     NO-UNDO LABEL 'Would you like a drink?'.

UPDATE lg .

MESSAGE(STRING(lg, 'Yes, I~'ll have a beer please./No Thanks. I~'m driving.'))
    VIEW-AS ALERT-BOX INFO.
 
Top