Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CAL_$DECODE_ASCII_TIME            Domain/OS             CAL_$DECODE_ASCII_TIME


NAME
     cal_$decode_ascii_time - decode an ascii time

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/cal.h>

     void cal_$decode_ascii_time(
          char *time_string,
          short &string_length,
          short *hour,
          short *minute,
          short *second,
          status_$t *status)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/cal.ins.pas';

     procedure cal_$decode_ascii_time(
          in time_string: univ cal_$string_t;
          in string_length: integer;
          out hour: integer;
          out minute: integer;
          out second: integer;
          out status: status_$t);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/cal.ins.ftn'

           integer*2 string_length, hour, minute, second
           integer*4 status
           character time_string*80

           call cal_$decode_ascii_time(time_string, string_length, hour,
          &                            minute, second, status)

DESCRIPTION
     Cal_$decode_ascii_time decodes an ASCII time supplied in time_string into
     three integers representing the hour, minute, and second.  The ASCII time
     must have the form "HOUR:MINUTE:SECOND" or "HOUR:MINUTE", where HOUR,
     MINUTE, and SECOND are decimal integers.

     time_string
          An ASCII string representing the time to be decoded.
          Cal_$decode_ascii_time ignores leading and trailing spaces in
          time_string.

     string_length
          The number of bytes in time_string.

     hour The hour decoded from time_string.

     minute
          The minute decoded from time_string.

     second
          The second decoded from time_string.  If only hours and minutes are
          specified in time_string, cal_$decode_ascii_time returns 0 in
          second.

     status
          The completion status.  If cal_$decode_ascii_time fails, it may
          return one of the following values in status:

          cal_$bad_syntax
               The string is not in the proper format.

          cal_$empty_string
               The string length is zero or the string contains only spaces.

          cal_$out_of_range
               The string contains an invalid hour, minute, or second.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026