HyperWorks Solvers

STRING_READ

STRING_READ

Previous topic Next topic No expanding text in this topic  

STRING_READ

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Subroutine Type

Modeling

Definition

Inputs a user-defined string.

Use

<Reference_String

    id                  = "11401021"

    label               = "tpf full name"    

    usrsub_param_string = "USER(501,1001)"

    usrsub_dll_name     = "NULL"

    usrsub_fnc_name     = "STRING_READ"

/>

Calling Syntax

Fortran

SUBROUTINE STRING_READ (ID, PAR, NPAR, ERRFLG)

 

C

void STDCALL STRING_READ (int *id, double *par, int *npar, int *errflg)

 

Python

def STRING_READ(id, par, npar)

    return errflg

 

MATLAB

function errflg = STRING_READ(id, par, npar)

Input Arguments

[integer] ID

The user-defined string element identifier.

 

[double precision] PAR

An array that contains the constant arguments from the list provided in the user defined statement.

 

[integer] NPAR

The number of entries in the PAR array.

 

[int] ERRFLAG

The intialization flag.

Output Arguments

None.

Example

def STRING_READ(id, par, npar):

 

    iname = py_gtinam()

    [string, istate] = py_gtstrg (int(par[1]))

    errflg = py_put_string(id, string)

 

    return errflg

Comments

1.STRING_READ can only be defined for a string element.  That is, Reference_String.
2.The ID of the Reference_String defined with STRING_READ may be referenced the same way as a normal Reference_String element.

See Also:

Modeling Subroutines