× 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 Wed, 20 Mar 2002, Douglas Handy wrote:

> >And...  this type of "using meaningful names" doesn't do anything that you
> >couldn't also do with the *INKx indicators!
>
> >     D p_KEY_F3        S               *   inz(%addr(*INKC))
> >     D KEY_F3          S              1N
>
> And so what it the equivalent to the above for the Enter key?

Umm... enter is the default case?  I've never needed to code a check for
the enter key.  Enter is what you get when the other keys don't happen.

> >The code is still shorter.  It's still easier to explain to the uninitiated.
>
> You think a pointer variable is easier to explain to the uninitiated then:
>
>      D/Copy WSINFDS

Well I'm not sure what uninitiated means, but when I first started with
RPG pointers made perfect sense to me, having come from a language that
used pointers all the time.  But INFDS does not make sense for the
background I had.  Where does it come from?  How does it get data into it?
Why do they have to make this stuff so hard?  These are questions I asked
myself when introduced to INFDS.  Pointers were easy.  How RPG got along
all those years without them I'll never understand.

Once told that "*inkc is an indicator that means that the F3 key was
pressed" it was easy to keep that straight (of course indicators also
seemed like a weird and silly concept - still do).

I guess that today you could probably do:

/define F3_KEY *inkc

and then use:

C               if      F3_KEY = *on

Then forget all about AID or INFDS.

James Rich
james@eaerich.com



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.