[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
2 GetList Compiler Warning
--------------------------------------------------------------------------------
Compiling with the /W option to generate warning messages when
ambiguous variable references are encountered generates one or more
warning messages for GetList if the current program (.prg) file
contains any of the following commands:
@...GET
CLEAR
CLEAR ALL
READ
READ SAVE
These messages can be suppressed by declaring GetList with a MEMVAR
statement. This can either be a procedure or file-wide
declaration. To make the declaration procedure-wide, place the
MEMVAR statement before the first executable statement of each
procedure or user-defined function that uses any of these
commands. For example:
FUNCTION DoEntry
MEMVAR GetList
USE Customer NEW
.
.
.
READ
RETURN NIL
The better approach is to use file-wide declaration. To do this
place the MEMVAR declaration at the top and outside the body of the
first procedure or user-defined function in any (.prg) file that
references any of these commands. As with any other file-wide
declarations, the (.prg) file must be compiled with the /N option.
For example, the following code fragment demonstrates a typical
(.prg) file that conforms with this structure:
/***
* A typical Clipper 5.0 (.prg) file
*
*/
// File-wide declarations
MEMVAR GetList
FUNCTION Main
.
.
.
RETURN NIL
FUNCTION SubMain
.
.
.
RETURN NIL
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson