Technical data
3
Writing Target Language Files
3-30
Built-In TLC Functions
The most common built-in TLC functions required to write a block target file
are
STRINGOF, EXISTS, and SIZE.
STRINGOF(value)
Given an RTW string vector, this function returns the reconstructed string. For
example, this function returns the string
"float".
%<STRINGOF([102, 108, 111, 97, 116])>
The built-in function SIZEOF is commonly used to reconstruct S-function
parameters that are literal strings. For an example of this function, see
MATLAB_ROOT/rtw/c/mwdspace/devices/dp_read.tlc.
EXISTS("name")
This built-in function determines if name exists in the current scope space. Note
that
EXISTS commands search the current scope backwards to the root scope.
SIZE(value, n)
The behavior of this built-in function is:
If n = This Function Returns
0
The number of rows in value.
1
The number of columns in value.
2
[nRows, nCols]
in value.