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 - __c_dash string constant (dash character) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __c_dash            String constant (dash character)
------------------------------------------------------------------------------
 Declaration
   string.hdr

 Syntax
   char(1) __c_dash

 Default
   "-"

 Description
   The __c_dash system constant contains the dash character as a string.

   System-defined string constants can be used to save data segment
   space by avoiding the redundant declaration of certain frequently used
   string constants in application code.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   // This example lists switch- and non-switch-type command line arguments.
   
   proc Test_c_dash
   vardef
      uint n
   enddef
   if argc() == 0
      ? "No command line arguments"
   else
      for n := 1 to argc()
         if left( argv( n ), 1 ) == __c_dash .or. ;
            left( argv( n ), 1 ) == __c_slash
            ? "Switch:", argv( n )
         else
            ? "Non-switch:", argv( n )
         endif
      next
   endif
   endproc

   proc main
   Test_c_dash()
   endproc

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