Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Release Notes - <b>2 getlist compiler warning</b> http://www.X-Hacker.org [<<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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson