STRING_READ

ModelingInputs 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"  
/>

Format

Fortran Calling Syntax
SUBROUTINE STRING_READ (ID, PAR, NPAR, ERRFLG)
C/C++ Calling Syntax
void STDCALL STRING_READ (int *id, double *par, int *npar, int *errflg)
Python Calling Syntax
def STRING_READ(id, par, npar)
    return errflg
MATLAB Calling Syntax
function errflg = STRING_READ(id, par, npar)

Attributes

ID
[integer]
The user-defined string element identifier.
PAR
[double precision]
An array that contains the constant arguments from the list provided in the user defined statement.
NPAR
[integer]
The number of entries in the PAR array.
ERRFLAG
[integer]
The initialization flag.

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.