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




On 12/01/2010, at 7:08 AM, Vern Hamberg wrote:

I guess I don't see the need for the H-spec - Jon has posited that it is
sufficient to test positions 6-7 - if there is a C in position 6, it is
a C-spec - maybe that'd be enough. And maybe it's enough to test for //
anywhere for comments and blanks in 6-7 for various free-form syntax,
whether C or other kinds of specs.

That's true but the H-Spec acts as documentation for a maintenance programmer. Indicates this is a free-form RPG program. Also, the H- Spec may make it easier for the compiler writers to implement--a sort of heads-up that a line of code with no specification is not an error condition etc. I don't care either way. It would be nice to not have to code /FREE and /END-FREE at all. How the compiler writers accomplish that isn't of much moment but I see little need to squander development dollars on a full free-form syntax when there is so much else on which that money could be spent.

The other issue is opcodes for which there is no free equivalent - the
SCAN opcode already mentioned does have functionality that is still
useful, seems to me.

Yes, it's useful but can be replaced by a %scan loop or hidden in a procedure.

Has there been a comprehensive document giving the free-form ways to
accomplish what the various non-free opcodes do?

Don't think so. The RPG Reference provides reasonable examples of using the free-form variants and describes difference under Move Operations, Date and Time Operations, etc.

Like how do you do all
the things the MOVEx can do - just what examples are there of that?

There is NO free-form equivalent to all the things MOVE can do. Mostly the esoteric behaviour of MOVE is not required and an EVAL will suffice. When you do need to use MOVE or any of the other op-codes that have no free-form equivalent just hide them in a procedure and call that from your free-form code.

In fact, I've just realised why /FREE isn't such a big issue for me. I specify /FREE at the start of the mainline C-specs and /END-FREE at the end but my procedures themselves tend to be in fixed-form. My procedures don't tend to be large and there is little to be gained by using free-form vs. fixed (except a bit more typing space). Mind you, the bulk of my procedures are in service programs and so the code is not visible in the consuming program. Also, with fixed-form I don't have to type all those bloody semi-colons!

Then we could make snippets of them all - hey- maybe IBM could make such
snippets - and use those.

Perhaps that's a candidate for a new Wiki section?

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.