Buck wrote:
...
My personal view is basically stylistic. I've been doing RPG since 1978
and my world view is coloured by that. I don't prefer to see a further
exposure of the internal compiler storage regime with
options(*varying:4) but that's just s style thing. I don't have the
slightest rational reason for finding that unpleasant to look at and
can't justify my position in the slightest.
I agree that it would be nice if the compiler could just handle
everything, but for reasons both I and Scott have given (interaction
with other languages, commands, APIs etc), it would be less usable in
the long run. Anyway, I think that the internal details of a varying
length field is similar in difficulty/awkwardness/whatever to the
internal details of a numeric field (packed/zoned/integer, number of
digits, number of decimals). Somewhat difficult to learn at first, but
once you have learned it, it becomes second nature.
It would be wonderful if there was just a "string" type and a "decimal
numeric" type, where strings were always varying length but could behave
like fixed length, and could handle any ccsid; and where numerics could
handle any decimal value, while also being able to have only 2 decimal
places. That's partly available in many interpreted languages. But RPG
is a compiled and strongly-typed language; this varying business just
adds one more icky detail for RPG programmers to deal with.
This mailing list archive is Copyright 1997-2026 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.