|
Lim Hock-Chai wrote: > > Uummm. If the compiler is not sicked, then why it let me return a char > when the prototype says it should return a indicator? > Mainly because of upward compatibility. In V3R2, you could code this: P proc b D proc pi like(*inlr) c return '1' P e or even this: P proc b D proc pi like(*inlr) D charval s 1a c return charval P e When the indicator data type was added (v4r2?), defining something like an indicator made it an indicator, so now "proc" returns an indicator rather than the character(1) that it returned in v3r2. To retain compatibility, we had to allow character values to be assigned and compared with indicator values.
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.