Quellcode |
|
1 |
Global Const wd: [x:0,0,1,0,1,1,1,I]; |
Quellcode |
|
1 |
GetGlobalVar "wd", Write |
Quellcode |
|
1 |
Const x: [x:0,0,1,0,1,1,1,I]; |
Quellcode |
|
1 |
Global Const WD: x; |
Ich habe das gleiche Problem im VBS-Editor! Ich habe den Beispiel-Code aus der Anleitung unter Definitionen kopiert:Zitat
Ich habe unter HS/Defnitionen eine Globale Variable definiert, die ich
dann mit VBS in einem eigenen Testergebnis auswerten möchte. Ich komme
nicht an den Wert!
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
global calc MyCalc: 5; global calc vbs: VBScript(#>> Dim a, i GetGlobalVar "MyCalc", a if IsArray(a) then for i= 1 to ubound(a) if a(i)<>NoValue then a(i)=a(i)*2 end if next SetGlobalVar "MyCalc",a end if <<#); |
Ich habe Deinen Workaround nicht ganz verstanden. Aber ich bekomme mit Getconst nichts, egal ob das als Konstante, Variable, lokal, global wie auch immer definiert ist. Getconst erkennt bei mir noch nicht einmal der VBS-Editor als Befehl an (keine Veränderung der Farbe der Schrift). Welche IV Version nutzt Du? ich 7.Zitat
Zusatz: Wenn ich mit (dem kaum dokumentierten)
VBS-Befehl getconst arbeite, kann ich auf Konstanten aus dem
Definitionsfenster zugreifen.
Quellcode |
|
1 |
Global Const wd: [x:99,0,1,0,1,1,1,I]; |
Quellcode |
|
1 2 |
GetGlobalVar "wd", Write Ergebnis = Write |
Quellcode |
|
1 2 3 4 5 6 7 8 |
Global Const wd: [x:99,0,1,0,1,1,1,I]; global calc z: 5; global calc vbs: VBScript(#>> dim write GetGlobalVar "wd", write setglobalvar "z", write <<#); |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
Global Const optiConst: [x:99,0,1,0,1,1,1,I]; Global Const fixConst: 5; global calc vbs: VBScript(#>> dim optiConstVBS, fixConstVBS 'übernehme optiConst IN optiConstVBS GetGlobalVar "optiConst", optiConstVBS MsgBox("optiConstVBS:" + optiConstVBS) 'alter Wert GetGlobalVar "fixConst", optiConstVBSnew MsgBox("fixConstOld:" + optiConstVBSnew) 'übernehme optiConstVBS IN fixConst SetGlobalVar "fixConst", optiConstVBS 'neuer Wert GetGlobalVar "fixConst", optiConstVBSnew MsgBox("fixConstNew:" + optiConstVBSnew) <<#); |