HP 3000 Manuals

a64l [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

a64l 

Converts a base-64 ASCII string to a long integer.

Syntax 

long a64l (char s);

Parameters 

s             A pointer to a null terminated base-64 ASCII string.
              Maximum length is 6 bytes; not counting the null
              terminator.

Return Values 

x             A long integer containing the binary value of the base-64
              ASCII string.

Description 

This function maintains numbers stored in base-64 ASCII characters.  Long
integers can be represented by up to six characters.  Each character
represents a digit in a radix-64 notation.

The characters used to represent digits are:

-----------------------------------------------
|                       |                     |
|      Characters       |       Digits        |
|                       |                     |
-----------------------------------------------
|                       |                     |
|           .           |          0          |
|                       |                     |
-----------------------------------------------
|                       |                     |
|           /           |          1          |
|                       |                     |
-----------------------------------------------
|                       |                     |
|      0 through 9      |    2 through 11     |
|                       |                     |
-----------------------------------------------
|                       |                     |
|      A through Z      |    12 through 37    |
|                       |                     |
-----------------------------------------------
|                       |                     |
|      a through z      |    38 through 63    |
|                       |                     |
-----------------------------------------------

The leftmost character is the least significant digit.  For example:

     a0 = (38 x 640) + (2 x 641) = 166

The a64l function is passed a pointer to a null-terminated base-64
representation and returns a corresponding long value.  If the string
pointed to by s contains more than six characters, a64l() uses the first
six (leftmost) characters.

See Also 

l64a()



MPE/iX 5.0 Documentation