Technical data

3
Writing Target Language Files
3-8
Coding Conventions
The following guidelines help ensure that the programming style in each TLC
file is consistent, and hence, more easily modifiable.
1
All identifiers in the RTW file begin with a capital letter. For example,
NumContStates 10
NumBlocks 52
Note that block records that contain a Name identifier should start the name
with a capital letter since the
Name identifier is often promoted into the
parent scope. For example, a block snippet may contain
Block {
:
TID 0
NumRWorkDefines 1
RWorkDefine {
Name "PrevT"
Width 1
}
PrevT RWorkDefine[0]
:
}
Since the Name identifier within the RWorkDefine record is promoted to
PrevT in its parent scope, it must start with a capital letter. The promotion