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

  • 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 59
2
Working with the Target Language
2-40
This produces:
Figure 2-2: Creating Multiple Records
Adding Parameters to an Existing Record
You can use the %assign directive to add a new parameter to an existing
record. For example,
%assign N = 500
%assign x = Block[Idx] + N /% Adds N with value 500 to Block %/
%assign myn = Block[Idx].N /% Gets the value 500 %/
Rec1 {
Rec2 {
Name "Name0"
Type "t0"
}
Rec2 {
Name "Name1"
Type "t1"
}
Rec2 {
Name "Name2"
Type "t2"
}
.
.
}
First New Record
Existing Record
Second New Record
Zobrazit stránku 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 281 282

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

Žádné komentáře