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 - logtostr() return the string representation of a logical http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 logtostr()          Return the string representation of a logical
------------------------------------------------------------------------------
 Declaration
   string.hdr

 Syntax
   func char logtostr extern
   param value logical lValue

 Arguments
   lValue is the logical to convert to a string.

 Return
   The string representation of the passed logical.

 Description
   The logtostr() function converts a logical to a string. The returned
   string is ".T." if the passed parameter is true, and ".F." if .f. is
   passed. The function does not respect the settings by the setlogicmask()
   procedure.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_logtostr
   vardef
      int n
   enddef
   ? logtostr( .f. )            // print ".F."
   ? logtostr( .t. )            // print ".T."
   for n := -5 to 5             // numerics can be applied as logicals
      ? n, logtostr( n )        // print ".T.", except when 0 is passed
   next
   endproc

   proc main
   Test_logtostr()
   endproc

See Also: ltoc() strtolog()

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