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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 282
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 63
2
Working with the Target Language
2-44
The scoping rules within functions behave differently. A function has its own
scope, and that scope gets added to the previously described list as depicted in
this figure.
Figure 2-6: Scoping Rules Within Functions
Target Language Functions
The target language function construct is:
%function identifier ( optional-arguments ) [Output | void]
%return
%endfunction
Functions in the target language are recursive and have their own local
variable space. Target language functions do not produce any output, unless
they explicitly use the
%openfile, %selectfile, and %closefile directives, or
are output functions.
Global Pool
%assign a = …
%assign b = …
Top-Level RTW Pool
CompiledModel {
}
%with CompiledModel.
System[Sysidx]
2
3
4
1
%function function(…)
foo (x,y)
Vista de pagina 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 281 282

Comentarios a estos manuales

Sin comentarios