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_func_proc warning suppression: function referenced as procedure http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 #pragma W_FUNC_PROC Warning suppression: Function referenced as procedure
------------------------------------------------------------------------------
 Syntax
   #pragma W_FUNC_PROC+|-

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

 Description
   The #pragma W_FUNC_PROC directive controls the generation
   of a compiler warning when a function is called without assigning its
   return value to a variable, or passing it to an expression.

 Example
   #define EXAMPLE_DIRECTIV
   #include example.hdr

   proc Test_866
   vardef
      uint uKey
   enddef
   
   #pragma W_FUNC_PROC+
   ? "Press a key"
   uKey := getkey() // the return value of the function is utilized; no warning
   
   ? "Press a key"
   getkey()  // the return value of the function is ignored; warning shown
   
   #pragma W_FUNC_PROC-
   ? "Press a key"
   getkey()  // the return value of the function is ignored; warning not shown
   endproc

   proc main
   Test_866()
   endproc

See Also: func

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