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



From: Scott Klement

Joe Pluta wrote:
Please realize that the magic number "2" may change in a future release
of
the compiler. No need to rehash the entire discussion, but once VARYING
fields great than 64K are allowed, you may need to adjust this code.

Joe in the previous thread, Barbara said (in no uncertain terms) that
the change will be made in a manner that ensures that no existing code
will break.

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

http://archive.midrange.com/rpg400-l/200705/msg00766.html

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?).

Another option is the one I lobbied for: I wanted VARYING without a
parameter to mean 2 bytes for short fields and 4 bytes for long fields.
Barbara said she didn't like that.

I guess another possibility is that VARYING without a parameter is
deprecated entirely. And then technically you won't have to change the
C-spec, but you will have to go and fix all of your varying fields. That's
probably unlikely to happen.


There should be no chance of this code having to be changed.

Right, unless the user changes the size of the buffer to a value greater
than 64K, or specifies VARYING(4) on the field.

Joe



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.