Incorrect error message, odd array error.

Kenneth Brody kenbrody at bestweb.net
Wed Jun 2 12:19:17 PDT 2004


William James McEachran wrote:
> 
> I'm getting a bogus filePro error claiming array index out of range with the
> following code.
[...]
>        Then: np=asc(LIA_DO)-"67"   'sets place in pref arrays
>        Then: msgbox "\nnp is" < np { "\nprfttl[np] is" < prfttl[np]
>        Then: at=at-prfttl[np]  'refuses to work, claims np is "0"
> 
> The message box produces:
> 
>                            +-----------------------+
>                            |                       |
>                            | np is 3               |
>                            | prfttl[np] is 5000.00 |
>                            +------- Press  Enter   +
> 
> So, all appears well ... however ... the next thing to happen is bad.
> 
> -----------------------------------------------
> *** A filePro Error Has Occurred ***
> 
> Array Index Out of Range: dim prfttl(7) -- Index: 0
> 
> Output Processing
> Line Number: 17
> 
> at=at-prfttl[np]  'refuses to work, claims np is "0"
[...]

Without seeing all of the processing, my guess is:

    (1) "np" is declared in automatic processing.
    (2) You are using rreport and not dreport.
    (3) You are running rreport with a "-y" to override automatic
        processing.
    (4) The "-y" automatic processing does not have "np" declared.
    (5) You did not compile* output processing with the same "-y"
        are you pass to rreport.


(*) Sorry, Mark.  ;-)

-- 
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody        | www.hvcomputer.com |                             |
| kenbrody at spamcop.net | www.fptech.com     | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+



More information about the Filepro-list mailing list