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



Joe Pluta wrote:

Barbara said that she would rather that programmers had to specify the
length for all VARYING fields, because RPG is a strictly typed language.

Sure I would _rather_ that, but I can't _have_ that, due to compatibility. If RPG's VARYING support changes, any existing code with VARYING will continue to mean exactly the same thing in the future. If you subtract 2 to get the size or add 2 to get the length, it will continue to work. Cross and stamp and no erasies.

Now, it might be that she meant that you could specify VARYING without a
length and that it would default to 2, although she doesn't clearly say that
in any of her posts. In that case I guess you'd get a compiler error if you
specify a field length greater than 64K for a field with the simple VARYING
keyword (is that what you meant, Barbara?).


Yep. But I think I was clear (http://archive.midrange.com/rpg400-l/200705/msg00356.html): "Any definitions that simply have the VARYING keyword would continue to have a 2 byte prefix and get a compile-time diagnostic if the length is too long. And conversely, a varying definition of any size could be explicitly defined to have a 4 byte prefix."




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.