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



Joe Pluta wrote:

> > From: McCallion, Martin
> >
> > To quote McConnell (_Code Complete_): "explicit is better than
> > implicit".
>
> Honestly, I rarely consult McConnell to determine my coding practices.

That's as may be, but I think it's good advice.

> > In the former statement it's very clear that the intent is
> > to modify a substring of the lotnumber; in the latter it is not.
>
> On the other hand, to a good RPG programmer, the intent is
> perfectly clear.
> Go figure.

I think this thread has shown that that is not always true; or at least,
it is not always obvious that you are updating a _substring_, rather
than the whole field.  Yes, you should be aware of the attributes of the
fields you are working with, but my point is that the use of the %subst
bif makes it explicit both that you are doing a substringing operation,
and that you _intended_ to.

> >     eval %subst( lotnumber :
> >                      ( %len( lotnumber ) - %len( lotseq ) ) + 1 :
> >                      %len( lotseq ) ) =
> >              %editc( lotseq : 'X' )
> >
> > That doesn't look too great in a proportional font, but in
> fixed-width
> > it should be fine.
>
> And this is where I have to see that you and I view the issue from
> completely different viewpoints.  To replace MOVE LOTSEQ
> LOTNUMBER with the
> code above is so intuitively bad to me that I doubt you and I
> can rationally
> continue a discussion.  This is a case where PC (Programming
> Correctness) is
> taken to an absurd conclusion.

My point here wasn't that the code above was necessarily that good, or
even the best it could be, but simply to suggest that careful layout of
code can greatly improve readability.

Cheers,

Martin.

--
Martin McCallion
Senior Technical Consultant
Work:  martin.mccallion@misys.com
Home: martin.mccallion@ukonline.co.uk
Misys International Banking Systems
1 St George's Road, London, SW19 4DR, UK
T +44 (0)20 8486 1951
F +44 (0) 20 8947 3373
www.misys.com
This email message is intended for the named recipient only. It may be
privileged and/or confidential. If you are not the  intended named
recipient of this email then you should not  copy it or use it for any
purpose, nor disclose its contents to any other person. You should
contact Misys International Banking Systems as shown below so that we
can take appropriate action at no cost to yourself.
Misys International Banking Systems Ltd,1 St
George's Road, London, SW19 4DR, UK. Email: ibs.postmaster@misys.com.
Tel: +44 (0) 20 8879 1188 Fax: +44 (0) 20 8947 3373
Misys International Banking Systems Ltd is
registered in England and Wales under company no. 971479


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.