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


  • Subject: Re: what is unclear about 01 02 03 -Reply
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Thu, 07 May 98 20:07:19 +1000

At the risk of boring the enlightened and irritating the benighted ...

Comments should illuminate not reiterate.  Tell me WHY you did something not 
what you did.  The what should be 
obvious from the code (although some of the examples posted here give the lie 
to that).  The why is rarely 
obvious.

Anyone still using the *INKx indicators needs their head read.  Maybe the 
geezers instantly know which key 
*INKP is but there are more obvious ways;  Assigning *IN01 to *IN24 to the 
function key is more obvious due the 
mnemonic relationship between the key and the indicator.  Better yet is to use 
the AID byte from the feedback 
area and avoid the indicators entirely.  Besides you simply don't need to use 
all those indicators.

Named indicators are already available in RPGIV with pointer support.  Simply 
code the following:

D @Indicator        S                  *       INZ(%ADDR(*IN))
D Indicators        DS                         BASED(@Indicator)
D  SflInz                                51  51  
D  SflClr                                52  52
D  SflDsp                                53  53
D  SflDspCtl                             54  54
D  SflEnd                                55  55
D  SflNxtChg                             56  56

Then you can do things like:

C                       IF      SflRRN > *ZERO
C                       EVAL    SflDsp = *ON
C                       ENDIF
C                       EVAL    SflDspCtl = *ON

Regards,
Simon Coulter.

//----------------------------------------------------------
// FlyByNight Software         AS/400 Technical Specialists
// Phone: +61 3 9419 0175      Mobile: +61 3 0411 091 400
// Fax:   +61 3 9419 0175      E-mail: shc@flybynight.com.au
// 
// Windoze should not be open at Warp speed.
 

//--- forwarded letter -------------------------------------------------------
> X-Mailer: Microsoft Outlook Express 4.72.2106.4
> Date: Wed, 06 May 98 12:58:29 -0500
> From: "Scott Swaim" <scott71@hpnc.com>
> To: MIDRANGE-L@midrange.com
> Reply-To: MIDRANGE-L@midrange.com
> Subject: Re: what is unclear about 01 02 03 -Reply

> 
> That was my original point.  If you look at the comment that I added to the
> code all that I did was to echo the code.  I do not know what this line of
> code does.  I do not know what the fields are.  I do not know what the SR
> means.  If the original code were commented,  I (you could substitue
> "newbie", "junior programmer", "other poor sap" etc.) would not have had a
> problem understanding the code.  But in the defense of the original poster,
> this is only a snippet of code therefore we could ALL assume that the
> comments were actually there but not copied into the post. <bg>
> 
> Also while we are on the subject of indicators,  Is there any update in the
> works to DDS that will allow for named indicators?
> 
> One last thing that will make you go hmmmmmm!  After we remove left hand
> indicators altogether from RPG will the Function keys be assigned new
> labels?
> 
>            example   INKA = FK01
> 
> 
> Scott Swaim
> scott71@hpnc.com
> Never wanting to incite an argument, just want to make you think.
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Hans Boldt <boldt@ca.ibm.com>
> To: MIDRANGE-L@midrange.com <MIDRANGE-L@midrange.com>
> Date: Wednesday, May 06, 1998 12:13 PM
> Subject: Re: what is unclear about 01 02 03 -Reply
> 
> 
> Scott:  While good comments are a requirement of any readable and
> maintainable program, most modern coding guidelines recommend
> against comments that just echo what the code already says.  The best
> code is written in such a way that you don't need to read the comments
> to understand what it does.  Techniques such as modularization and
> meaningful variable and procedure names help to achieve readable
> programs.
> 
> Having too many comments results in the following:
> 1) Comments can easily get out of synch with the code
> 2) It is not immediately clear which comments offer useful and
>    meaningful insight into the logic.
> 
> Cheers!  Hans
> 
> Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com
> 
> 
> 
> 
> 
> 
> 
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
> 

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.