SERIALIZE_CHARACTERS

SERIALIZE_CHARACTERS allows you to save character static data from your user subroutines when Solver is executing a SAVE/ command to be used later when reloading an analysis.

Use

Called By

Any user-written subroutine

Prerequisite

The user subroutine is being called to serialize data.

Calling Sequence

CALL SERIALIZE_CHARACTERS (c_array, n)

Input Argument

 
c_array
A character array containing the data to be serialized.
n
An integer variable that specifies the number of values contained in c_array.

Example

F77:

IF(IFLAG .EQ. 3)THEN
... Make calls to sysfnc and sysary to set up dependencies ...
ELSEIF (IFLAG .EQ. 7)THEN
CALL SERIALIZE_CHARACTERS(C_DATA, LEN(C_DATA))
ELSEIF (IFLAG .EQ. 9)THEN
CALL UNSERIALIZE_CHARACTERS(C_DATA, LEN(C_DATA))
ENDIF

CXX:

switch(IFLAG){
case 3:
... Make calls to c_sysfnc and c_sysary to set up dependencies ...
break;
case 7:
c_dataSize = strlen(c_data)+1;
c_adams_serialize_integers(&c_dataSize, 1);
c_adams_serialize_characters(c_data, c_dataSize);
break;
case 9:
if(c_data)free(c_data);
c_adams_unserialize_integers(&c_dataSize, 1);
c_data = (char*) malloc(sizeof(char)*c_dataSize);
c_adams_unserialize_characters(c_data, c_dataSize);
break;
}