Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - #pragma w_get_local warning suppression: local variable used in get http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 #pragma W_GET_LOCAL Warning suppression: Local variable used in get
------------------------------------------------------------------------------
 Syntax
   #pragma W_GET_LOCAL+|-

 Arguments
   + and - control if the option is on or off, respectively.

 Description
   The #pragma W_GET_LOCAL directive controls the generation
   of a compiler warning when a local variable is used in conjunction
   with a get command. When a get is used with local variables, the
   respective read command must not be placed outside the same function,
   because the local get variables get out of scope.

 Example
   #define EXAMPLE_DIRECTIV
   #include example.hdr

   proc Test_867
   vardef
      char( 20 ) cName
   enddef
   cName := "Anastasia"
   clear
   
   #pragma W_GET_LOCAL+
   @ 10, 10 get cName      // warning issued for this line
   read
   
   #pragma W_GET_LOCAL-
   @ 12, 10 get cName      // no warning for this line
   read
   endproc

   proc main
   Test_867()
   endproc

See Also: get

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