MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manual de servicio Pagina 60

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 282
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de 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
Vista de pagina 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 281 282

Comentarios a estos manuales

Sin comentarios