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

 Syntax
   char(1) __c_slash

 Default
   "/"

 Description
   The __c_slash system constant contains the slash 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_slash
   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_slash()
   endproc

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