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

 Syntax
   func logical strtolog extern
   param const char cLogical

 Arguments
   cLogical is a string to be converted to a logical.

 Return
   A logical corresponding to the passed string.

 Description
   The strtolog() function converts a string to a logical. The function
   returns .t. if the passed string parameter is ".T." or ".t.", while
   it returns .f. for any other string.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_strtolog
   ? strtolog( ".T." )          // returns .t.
   ? strtolog( ".t." )          // returns .t.
   ? strtolog( ".F." )          // returns .f.
   ? strtolog( ".f." )          // returns .f.
   ? strtolog( ".T" )           // returns .f.
   ? strtolog( "T." )           // returns .f.
   ? strtolog( "hello" )        // returns .f.
   endproc

   proc main
   Test_strtolog()
   endproc

See Also: logtostr()

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