PRB: Unable to Find Unknown <Array>Last reviewed: April 29, 1996Article ID: Q95586 |
The information in this article applies to:
SYMPTOMSWhen you are building a project, the "Unable to Find Unknown <array>" message appears.
CAUSEThere are two causes for this error message. When you are passing an array to a procedure file, either the array has not been defined as EXTERNAL or it has been renamed in the procedure file using the PARAMETERS statement. When an array is passed to a procedure, the Project Manager must be able to identify the array; otherwise, the above error message appears.
RESOLUTIONIf the same array name is used in the calling program and the procedure, declare the array as PUBLIC or as EXTERNAL in the calling program. If the array name is changed in the procedure by using the PARAMETERS <newname> statement, then <newname> must be declared as PUBLIC or EXTERNAL. Alternatively, the references may be resolved by dimensioning <newname> in the procedure and providing the appropriate dimensions for the array. The EXTERNAL statement is for use only by the Project Manager and is ignored during program execution. The Program Example section should be changed as following:
Program Example:1.Create a program called TEST.PRG using following code:
DIMENSION invoice(4) STORE 'Paid' TO invoice DO dispinvo2.Create a program called DISPINVO.PRG using the following code:
?invoice(1) ?invoice(2) ?invoice(3) ?invoice(4) RETURN NOTE: To keep the error message from appearing, add the following line of code to the beginning of DISPINVO.PRG:
EXTERNAL ARRAY invoice REFERENCES"Commands & Functions," version 2.0, EXTERNAL command
|
Additional reference words: VFoxWin 3.00 FoxDos FoxWin 2.00 2.50 2.50a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |