MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Servisní příručka Strana 82

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 282
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 81
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
Zobrazit stránku 81
1 2 ... 77 78 79 80 81 82 83 84 85 86 87 ... 281 282

Komentáře k této Příručce

Žádné komentáře