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

  • 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 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)
Zobrazit stránku 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 281 282

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

Žádné komentáře