Technical data

2
Working with the Target Language
2-48
is not searched. Also, if a %with is included within a function, its associated
scope is carried with any nested function call. For example,
Figure 2-8: Scoping Rules When Using %with Within a Function
Global Pool
%assign a = …
%assign b = …
Top-Level RTW Pool
CompiledModel {
}
%with CompiledModel
System[Sysidx]
6
%with expression2
Block[Blkidx]
%function function1
foo (x,y)
%with expression3
Name[Nmidx]
%function function2
bar ( )
%<variableX>
5
4
3
2
1