MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manuale di Servizio Pagina 60

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 282
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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
Vedere la pagina 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 281 282

Commenti su questo manuale

Nessun commento