× 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: Reply to : Help - Can't see the forest for the trees
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 19 May 99 17:15:07 +1000


Well, V.Jagadish, it won't work!

Aside from the poor form (TAGs and GOTOs) your IF test will ALWAYS evaluate to 
true even if 
xxfac contains '20' or '30' or '40'.  When you are negating tests you need to 
AND the clauses.

    c                   if        xxfac <> '20' AND xxfac <>'30' AND xxfac 
<>'40'

It's exactly this sort of abomination that gives RPG (and RPG programmers) a 
bad name -- it's 
right up there with running out of indicators.

Regards,
Simon Coulter.

«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software         AS/400 Technical Specialists       «»
«» Eclipse the competition - run your business on an IBM AS/400.  «»
«»                                                                «»
«» Phone: +61 3 9419 0175      Mobile: +61 0411 091 400           «»
«» Fax:   +61 3 9419 0175      mailto: shc@flybynight.com.au      «»
«»                                                                «»
«» Windoze should not be open at Warp speed.                      «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
//--- forwarded letter -------------------------------------------------------
> X-Mailer: Internet Mail Service (5.5.2448.0)
> Date: Wed, 19 May 99 10:09:52 +0530
> From: "vjagadish" <vjagadish@inf.com>
> To: "'RPG400-L@midrange.com'" <RPG400-L@midrange.com>
> Reply-To: RPG400-L@midrange.com
> Subject: Reply to : Help - Can't see the forest for the trees

> 
> Reply: Instead the three conditions in one IF probably you can use the
> following:
> 
>   *  Check for valid fac/dept number combinations
>    c                   if        xxfac <> '20'  or xxfac <>'30'  or xxfac
> <>'40'
> 
>    c                             GOTO  ENDTAG
> 
>    c                             ENDIF
> 
>    c                             IF xxdept = '0200'
> 
>    *                             Perform the rest of the operation .......
> 
> I guess this would work ......
>   Regards,
> V.Jagadish
> Infosys Technologies Limited.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.