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








I was manteining one of our program when i got a strange RPG behaviour,
both in WDSC and with ILE compiler.

I had the following spec :

If %xfoot(%SubArr(Des:NumTag+1:15-Numtag)) > *zeros ;

which, of couse, generated an error when NumTag = 15 (index out of bound,
or something similar).

I obviously change to the correct-and-usual

If NumTag < 15 and %xfoot(%SubArr(Des:NumTag+1:15-Numtag)) > *zeros ;

which is the usally way to chech the array index is inside array bound (see
some hundred of example, even from IBM ...)

Now, the compiler stop with

RNF0631 - The built-in function %SUBARR is not allowed within an expression
involving the relational operator AND or OR. The built-in function is
ignored.

I ended up breaking the statement in two diff row, but still i can't
understand why the compiler rant about. I already got bad luck with
%subarr() in the past (got a Fix from RPG lab, at time) but since we're
using a lot of array in our programs, we found it to be very useful, and
this behaviour seems to me an arbitrary , unreasonable lock.

I have carefully checkhed the manual, and there's nothing referring to this
problem. Any hint??



--

Nicola Brion
Tech Fossil (Often called a Dinosaur) - ancient animal that make things to
work.

"Ogni volta che la gente è d'accordo con me, provo la sensazione di avere
torto."


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.