Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pack_data_record(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PACK DATA RECORD(3P)  —  SUNPHIGS LIBRARY

NAME

PACK DATA RECORD − pack values from FORTRAN arrays into a data record

SYNOPSIS

FORTRAN Syntax

SUBROUTINE pprec ( IL, IA, RL, RA, SL, LSTR, STR, MLDR, ERRIND, LDR, DATREC )
INTEGERILnumber of integer entries (>= 0)
INTEGERIA(∗)array containing integer entries
INTEGERRLnumber of real entries (>= 0)
REALRA(∗)array containing real entries
INTEGERSLnumber of character string entries (>= 0)
INTEGERLSTR(∗)lengths of each character string entry (>= 0)
CHARACTER∗(∗)STR(∗) character string entries
INTEGERMLDRdimension of data record array
INTEGERERRINDOUT error indicator (zero if no error)
INTEGERLDROUT number of array elements used in DATREC
CHARACTER∗80DATREC(MLDR) OUT data record

FORTRAN Subset Syntax

SUBROUTINE pprec ( IL, IA, RL, RA, SL, LSTR, STR, MLDR, ERRIND, LDR, DATREC )
INTEGERILnumber of integer entries (>= 0)
INTEGERIA(IL)array containing integer entries
INTEGERRLnumber of real entries (>= 0)
REALRA(RL)array containing real entries
INTEGERSLnumber of character string entries (>= 0)
INTEGERLSTR(SL)lengths of each character string entry (>= 0)
CHARACTER∗80STR(∗) character string entries
INTEGERMLDRdimension of data record array
INTEGERERRINDOUT error indicator (zero if no error)
INTEGERLDROUT number of array elements used in DATREC
CHARACTER∗80DATREC(MLDR) OUT data record

Required PHIGS Operating States

(∗, ∗, ∗, ∗)

DESCRIPTION

Purpose

PACK DATA RECORD is a PHIGS FORTRAN utility function.  It packs variable or implementation-dependent data values into a data record, to be an input parameter for the FORTRAN binding functions’ fixed argument lists. 

FORTRAN Input Parameters

ILThe number of INTEGER entries to pack. 

IAAn array containing the IL INTEGER values to pack.  The FORTRAN subset syntax restricts IA to be of dimension IL. 

RLThe number of REAL entries to pack. 

RAAn array containing the RL REAL values to pack.  The FORTRAN subset syntax restricts RA to be of dimension RL. 

SLThe number of character string entries to pack. 

LSTRAn array containing the lengths of the SL character strings. 

STRAn array containing the SL character strings to pack.  The FORTRAN subset syntax restricts the STR array to be CHARACTER∗80.  The STR argument is required, even if the number of strings, SL, is 0. 

MLDR
The number of 80-character strings available in DATREC. 

FORTRAN Output Parameters

ERRIND
The error number of any error detected by this function.

LDRThe number of 80-character strings used in the DATREC array.  If MLDR is less than LDR, LDR will return the number of elements that would be required to pack the data. 

DATREC
The data record is packed into this array of 80-character strings.

Execution

PACK DATA RECORD packs multiple INTEGER, REAL, and CHARACTER string values into a single data record, in contiguous 80-character elements of the DATREC array. 

The data record may be used as an input parameter to a PHIGS FORTRAN function, along with the INTEGER LDR, used to dimension the array holding the data record.  This scheme allows the FORTRAN function to accept variable or implementation dependent data, in simple fixed-format parameters.  An example of a PHIGS FORTRAN function that accepts a data record is the FORTRAN ESCAPE function, pesc. 

The content of the data record is implementation dependent, but UNPACK DATA RECORD will extract the multiple values back into arrays from the data record. 

ERRORS

2001FORTRAN: Ignoring function, output parameter size insufficient -- a FORTRAN array or string being passed as an output parameter is too small to contain the returned value.

2004FORTRAN: Ignoring function, input parameter size out of range -- the INTEGER passed as an input parameter defining the size of FORTRAN array parameters is negative or greater than an absolute maximum (e.g. for FORTRAN subset functions taking strings as input parameters).

SEE ALSO

UNPACK DATA RECORD (3P)

Sun Release 4.0  —  Last change: 13 July 1989

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