× 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: James Rich
> 
> /free breaks you free from the limited number of characters available
> for variable names.  To use such a field you need free format code
> (unless you use the "loose fixed format" of eval+extended factor 2).

I use long names all the time.  I don't know why you think extended
factor two is somehow not part of RPG; my agrument is that the extended
factor two is what makes /free superfluous.  In fact, in my article I
suggest a minor extension to extended factor two to support some of the
older opcodes in order to remove your valid criticism of the factor 1
limitation:

http://www.mcpressonline.com/mc?1@xxxxxxxxxxxxxxxxxxxx@.6ae72624



> Further, I'm not sure of how well fixed format handles function calls
> with other functions as parameters since I haven't tried.  I would be
> surprised if it were as neat as:
> 
> myfunction (parm1, parm2, anotherfunction(parm3, parm4))

SURPRISE!

callp myfunction(parm1:parm2:anotherfunction(parm3:parm4))

This works just fine.  The only issue will be the length, at which point
you just continue to another line.

Have you actually tried using fixed format RPG IV, James?  You seem to
be mixing your thoughts of what you'd like a language to be
(dereferencing, commas between parameters) and the reality of /free
syntax, as well as some basic misunderstandings about how fixed format
RPG IV works.

For example, here's some fixed format code:

* SccIfsWrite: Write data                                             
P SccIfsWrite     B                   export                           
D SccIfsWrite     PI                                                   
D   xiData                     510A   varying                          
                                                                       
DCRLF             S              2A   inz(X'0D25')                     
                                                                       
C                   callp
check(write(FD:%addr(xiData)+2:%len(xiData))
C                   callp     check(write(FD:%addr(CRLF):2))           
                       
P SccIfsWrite     E    
                       
This code writes a varying string to an IFS file, appending a CRLF.  The
nested calls allow me to check the result - on failure, the check()
procedure sends an exception message up the stream.

Would it look nicer with /free?  Yeah, a little bit.  But not much.  And
it's not worth the various shortcomings of /free to make the switch.

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.