×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 2019-01-24 8:17 PM, Thomas Burrows wrote:
I have the following.
Dcl-s x_yes char(01);
Dcl-s x_no char(01);
How do I get x_yes set to 'Y' and x_no set to 'N';
I don't think anyone answered this part of your question yet. Use INZ.
Dcl-s x_yes char(01) inz('Y');
Dcl-s x_no char(01) inz('N');
(But I agree with others that using named constants would be best for
things like these that should always have the same value.)
*shudder* I'm having a nasty flashback to some code I worked on long ago
and far away that had global variables named N0 N1 N2 N3 N4 ... N100 and
X1 X2 X3 ... X100, used throughout the code instead of numeric literals
0 1 2 etc, for who knows what reason. A coding error had set one of them
(N1 if I recall correctly) to a new value which caused a bug that took
me way too long to find. Lesson somewhat learned: Never assume that a
variable contains what its name suggests.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.