Fehler bei opsi-winst & lokale Funktion

Antworten
thomas.besser
Beiträge: 455
Registriert: 09 Sep 2009, 09:40

Fehler bei opsi-winst & lokale Funktion

Beitrag von thomas.besser »

Hallo,

erstmal ein dickes, fettes Lob an UIB für die "lokalen Funktionen" ab opsi-winst 4.12.0!

Hab zum ersten Test das 1. Beispiel aus http://download.uib.de/opsi4.0/experime ... tes-de.pdf genommen.

Code: Alles auswählen

DefVar $mystr$
DefVar $str1$
set $str1$ = 'ha'
DefFunc myFunc(val $str1$ : string, $str2$ : string) : string
        set $result$ = $str1$ + $str2$
endfunc
set $mystr$ = myFunc("he","ho")
set $mystr$ = myFunc("he",timeStampAsFloatStr)
set $mystr$ = myFunc("he",$str1$)
Die letzte Zeile sollte als "erwartetes Ergebnis" "heha" liefern. Bei mir liefert es aber "hehe" zurück!

Code: Alles auswählen

(104)     [6] [Sep 29 10:19:45:593] [test_local-functions] Set  $mystr$ = myFunc("he",$str1$)
(105)     [6] [Sep 29 10:19:45:593] [test_local-functions] Set  $result$ = $str1$ + $str2$
(106)     [6] [Sep 29 10:19:45:593] [test_local-functions]   The value of the variable "$result$" is now: "hehe"
Verwendete Version von opsi-winst: 4.12.0.5-1

Gruß
Thomas
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: Fehler bei opsi-winst & lokale Funktion

Beitrag von d.oertel »

Hallo Herr Besser,

Ja - da war noch ein Bug. Ist schon korrigiert.
Ich melde mich wenn der fix in experimental verfügbar ist.

Danke für den Hinweis

gruß
detlef oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: Fehler bei opsi-winst & lokale Funktion

Beitrag von d.oertel »

Hallo,

hier ist der Fix:
http://download.uib.de/opsi4.0/experime ... 0.6-1.opsi

changelog:
opsi-winst/opsi-script (4.12.0.6) stable; urgency=low

* osconf: readConfigFromService reads configstates:
temporary uncommented: opsi-script.global.ScriptErrorMessages : boolean ; default=true (created as false)
opsi-script.global.AutoActivityDisplay : boolean ; default=false (created as true)
* general: adjusting log levels
5:LLNotice: comments,messages, Execution of sections
6:LLInfo; Statements, New values for stringvars , complete boolean expression
7: new values for stringlist vars, Output from sections,
shellcall if the output is not written to a stringlist, parts of a boolean expression
8: other stringlist output
9: content of saved temporary files
* osdefinedfunctions: TOsDefinedFunction.call: move inc(inDefinedFuncNestCounter)
below parseCallParameter

-- Detlef Oertel <d.oertel@uib.de> Wed, 27 Sep 2017:15:00:00 +0200

gruß
detlef oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
thomas.besser
Beiträge: 455
Registriert: 09 Sep 2009, 09:40

Re: Fehler bei opsi-winst & lokale Funktion

Beitrag von thomas.besser »

d.oertel hat geschrieben: hier ist der Fix:
http://download.uib.de/opsi4.0/experime ... 0.6-1.opsi
l
Hab den Fix getestet und kann bestätigen, jetzt tut es wie es soll:

Code: Alles auswählen

[Okt 06 08:36:35:355] [test_local-functions]   The value of the variable "$mystr$" is now: "heha"
Habe vorgestern noch etwas intensiver mit den lokalen Funktionen herumgespielt. Evtl. bin ich auf weitere Bugs gestossen, werde aber erst noch gegen 4.12.0.6 testen. Evtl. ist das damit auch schon gefixt.

Danke und Gruß
Thomas
Antworten