[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

a64l or l64a Subroutine

Purpose

Converts between long integers and base-64 ASCII strings.

Library

Standard C Library (libc.a)

Syntax

#include <stdlib.h>
long a64l (String)
char *String;
char *l64a (LongInteger )
long LongInteger;

Description

The a64l and l64a subroutines maintain numbers stored in base-64 ASCII characters. This is a notation in which long integers are represented by up to 6 characters, each character representing a digit in a base-64 notation.

The following characters are used to represent digits:

. Represents 0.
/ Represents 1.
0 -9 Represents the numbers 2-11.
A-Z Represents the numbers 12-37.
a-z Represents the numbers 38-63.

Parameters

String Specifies the address of a null-terminated character string.
LongInteger Specifies a long value to convert.

Return Values

The a64l subroutine takes a pointer to a null-terminated character string containing a value in base-64 representation and returns the corresponding long value. If the string pointed to by the String parameter contains more than 6 characters, the a64l subroutine uses only the first 6.

Conversely, the l64a subroutine takes a long parameter and returns a pointer to the corresponding base-64 representation. If the LongInteger parameter is a value of 0, the l64a subroutine returns a pointer to a null string.

The value returned by the l64a subroutine is a pointer into a static buffer, the contents of which are overwritten by each call.

If the *String parameter is a null string, the a64l subroutine returns a value of 0L.

If LongInteger is 0L, the l64a subroutine returns a pointer to a null string.

Implementation Specifics

These a64l and l64a subroutines are part of Base Operating System (BOS) Runtime.

Related Information

Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

List of Multithread Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]