Lade...
 

Code-Beispiel: Sichtbarkeit von Windowobjekten und Variablen

 

Window(win1, 10, 10, 300, 190, ". . . " ) [ Var(x, y) Define(Fak) // y = x! Dup 1 > if { Dup 1 - Fak * } ; INITIALIZE: 3 -> x { String(s1, . . . ) Module(Alfa) [ Var(a, b, x) Define(Fak) // verbesserte Version Dup 1 > if { Dup 1 - Fak * } else { Drop 1 } ; ] OList(pBox, SELECT_MULTIPLE, HZ_SCROLL_BAR, ITEM(800, 14), 10, 73, 400, 47) [ Define(SexSym) Copy(sexEnum) if " " else " " ; INITIALIZE: 4 -> x // P e r s o n [ "CX_PERSON::title", 0, COLOR BLUE ] SetFormat [ "CX_PERSON::name", 85, COLOR LIGHTBLUE ] SetFormat [ "CX_PERSON::firstName", 217, COLOR BLUE ] SetFormat [ "CX_PERSON::" Push(SexSym), 305, 7, COLOR LIGHTRED ] SetFormat ] } Window(win2, 70, 80, 200, 150, ". . . " ) { . . .

Ohne explizite Modulangabe am Anfang gehören Window win1, String s1, die Variablen x, y sowie Anweisung Fak zum globalen Modul. Modul- und Windowgrenzen sind unabhängig voneinander. Zu einem Modul werden oft ein oder mehrere Windows gehören. Aber es ist - wie hier gezeigt wird - auch möglich, dass verschiedene Childobjekte eines Windows unterschiedlichen Modulen zugeordnet sind. Die Tabelle gibt an, welche Variablen und Anweisungen in beiden Modulen bekannt sind:

bekannt in Variable Anweisungen
GLOBAL x, y Fak
Alfa a, b, x', y Fak', SexSym