sgetl, sputl
Purpose
Accesses long numeric data in a machine-independent
fashion.
Library
Object File Access Routine Library (libld.a)
Syntax
long sgetl (buffer) void sputl (value, buffer)
char *buffer; long value;
char *buffer;
Description
The sgetl subroutine retrieves 4 bytes from memory
starting at the location pointed to by the buffer param-
eter. It then returns the bytes as a long value with the
byte ordering of the host machine.
The sputl subroutine stores the 4 bytes of the value
parameter into memory starting at the location pointed to
by the buffer parameter. The order of the bytes is the
same across all machines.
Using sputl and sgetl subroutines together provides a
machine-independent way of storing long numeric data in
an ASCII file. For example, the numeric data stored in
the portable archive file format is accessed with the
sputl and sgetl subroutines.
Related Information
In this book: "frexp, ldexp, modf" and "ar."