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

 Syntax
   func uint ctom extern
   param const char(5) cTime

 Arguments
   cTime is a time string consisting of hours and minutes.

 Return
   Number of minutes elapsed since midnight, corresponding to the
   passed time string.

 Description
   The ctom() function returns the number of minutes corresponding to a
   time string.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_ctom
   vardef
      char cTime
   enddef
   cTime := time()                  // get current time string
   ? cTime
   ? ctom( cTime )                  // convert to number of minutes
   cTime := substr( cTime, 1, 5 )   // cut seconds
   ? cTime
   ? ctom( cTime )                  // convert to number of minutes
   endproc

   proc main
   Test_ctom()
   endproc

See Also: mtoc() seconds()

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