× 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.



Hey Kent,


<snip>
We are in the process of revamping our coding standards. Eons ago (and I
still see it today) I saw a few presenters declare all literals in the

<http://www.amazon.com/gp/product/B0006C9Y3G?ie=UTF8&tag=midrangedotcom&link
_code=em1&camp=212341&creative=380613&creativeASIN=B0006C9Y3G&adid=aa2f38b8-
5931-4696-b190-9eaa9d6133eb> D-specs. One presenter explained why he liked
declaring literals this way,
though I don't remember the reasons given. Now I have been asked to compile
a list of reasons/benefits for declaring literals in the D-specs. If there
are some real benefits to declaring literals this way, then we will make it
part of our standards. If you would be so kind to share your thoughts, I
would appreciate it.
</snip>

Probably already mentioned but - if using d-specs you should be able to
specify your constant literal in UCS2 format:

D MY_CONSTANT c const(%ucs2('MY VALUE'))

Your constant value can then be used in string comparisons, independent of
the ccsid of the job.

Not necessarily something you may need - but if your code is going to run on
different systems with different values for the job ccsid then you may want
to store your constants in a format that is independent of the system you
are running on. Of course, you will have to compare %ucs2(yourString) with
the constant. But it can buy you a lot in some situations.

Cheers

Larry Ducie


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.