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



Shouldn't that be either:
    DOW pos < 53 and InputMAD(pos) <> ';' 
or 
    DOW pos <= 52 and InputMAD(pos) <> ';'

If you just do less than 52, you'll only check 51 elements max.

Matt

-----Original Message-----
From: Fisher, Don [mailto:Dfisher@xxxxxxxxxxxxxxxxx]
Sent: Thursday, March 25, 2004 11:55 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: dim lights?


You're using the array subscript in the loop control as the first condition.
When pos gets to 53, the InputMAD(pos) condition is evaluated at the ENDDO.
pos is 53 then, so you get the index error.  You might try this:
DOW pos < 52 and InputMAD(pos) <> ';'

Hope that helps. 

Donald R. Fisher, III
Project Manager
Roomstore Furniture Company
(804) 784-7600 extension 2124
DFisher@xxxxxxxxxxxxx

<clip>
dow       (InputMAD(pos) <> ';') and 
          pos < 52                   
eval      pos = pos + 1              
enddo                                

Total dims are 52, so why am I getting an array index error?
<clip>


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.