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



Your quoted definition is the way I always thought it worked too, which is
why I was so surprised to see Mike's example.  In my compiled code (V4R5) it
seems to work ok, including references to both the constants and the ds
fields.

>From a documentation standpoint, I kinda like being able to define allowed
constants immediately after (and indented under) a code field, for example,
as long as it doesn't cause any other problems.  Do you think it was
retained for compatibility with RPG/400?

> -----Original Message-----
> From: Jon Paris [SMTP:Jon.Paris@Partner400.com]
> Sent: Thursday, January 02, 2003 9:00 PM
> To:   rpg400-l@midrange.com
> Cc:   Barbara Morris
> Subject:      Visual RPG vs. Other Visual languages
>
>  >> After 20+ years of RPG coding, I learned something just last week from
> Mike Cravitz that I had never seen in any other example code before.  That
> was the ability to stick constants (the D-specs) right in the middle of
> procedure parameters or ds specifications.
>
> Well this used to work in DSs with RPG/400 - but it doesn't (or shouldn't)
> work with RPG IV.  Maybe Barbara can comment, but this seems to be a
> compiler bug.  This is what the manual says:
>
> "Definitions of data structures, prototypes, and procedure interfaces end
> with the first definition specification with non-blanks in positions
> 24-25,
> or with the first specification that is not a definition specification."
>
> I just did a quick check using the CODE verifier for V5R2 and sure enough
> a
> constant in the middle of a DS does indeed "work".  I say "work" because
> although the Ds is sized correctly (which surprised me) the constant
> appears
> from the xref to be handled correctly - however - any attempt to reference
> it results in a "not defined" error.  In other words it works as long as
> you
> don't use the constant!  To my mind it _should_ issue a "subfield not in
> DS"
> error for the first field after the const.
>
>
> Jon Paris
> Partner400
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.


************************************************************************************************************************************************************************************************************
This message originates from Lincare Holdings Inc. It contains information 
which may be confidential or privileged and is intended only for the individual 
or entity named above.
It is prohibited for anyone else to disclose, copy, distribute or use the 
contents of this message.
All personal messages express views solely of the sender, which are not to be 
attributed to Lincare Holdings Inc., and may not be copied or distributed 
without this disclaimer.
If you received this message in error, please notify us immediately at 
MailAdmin@lincare.com or (800) 284-2006.
************************************************************************************************************************************************************************************************************



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.