Domino 9 und frühere Versionen > ND6: Entwicklung
Prüfen, ob Array leer ist
animate:
--- Zitat von: koehlerbv am 26.05.04 - 19:16:17 ---Wenn nämlich gar kein Empfänger vorhanden ist, dann gibt FullTrim nur ein Array mit EINEM Element (eben Number Zero) zurück, und mit Deinem ftarray (1) würdest Du dann sofort einen run-time error erhalten.
--- Ende Zitat ---
Kommt drauf an.
Es gibt die Möglichkeit, die Basis von Arrays von 0 auf 1 zu stellen
Option Base = 1 (oder so ähnlich).
dann würde es laufen
Glombi:
Das Problem mit Fulltrim ist inzwischen gefixt (falls es das von Thomas beschriebene ist):
Aus der KBASE:
LotusScript FullTrim Function Returns Unexpected Values
This document is based on the following :
About SPRs
SPR Number SPR Status SPR Fixed Release
RBEE5HZS9Z
RPOH5JGKXL
Problem
The LotusScript FullTrim Function does not function as designed in certain releases.
Under Notes Domino 6.0 and 6.0.1
The FullTrim function returns a value of unexpected length in cases where applied to a fixed length string that has not been assigned a value.
For example, in the following code, LenA will be set to 20, rather than the expected 0:
Dim S As String * 20
Dim A As String
Dim LenA as Integer
A = Fulltrim(s)
LenA = len(A)
The FullTrim function returns a value that internally contains multiple null characters that can have undesired results. It can cause unexpected termination of string formulas.
For example, for the following code:
Dim S As String * 20
Dim A As String
A = Fulltrim(s)
Print "Retuned value = '" + A + "'"
...the expected output would be:
Returned value ''
However, under Notes 6.0/6.0.1, the output actually is:
Returned value '
Under Notes 5.x:
When applying the LotusScript FullTrim function to the same variable multiple times, the subsequent calls add garbage characters.
For example, the following code:
Dim S As String * 20
Dim A As String
Dim B As String
Dim C As String
S="test"
A = Fulltrim(s)
B = Fulltrim(s)
C = Fulltrim(s)
...results in the following assignments:
A = "test"
B = "test ﳦӉ"
C = "test ﴎӉﴶӉ"
These issues have been reported to Lotus Quality Engineering.
The issues that appear with Notes 6.0 and 6.0.1 are resolved in Notes 6.0.1 CF1.
Excerpt from the Lotus Notes and Domino Release 6.0.1 CF1 fix list (available at http://www.notes.net):
LotusScript
SPR# RPOH5JGKXL - Fulltrim will now always trim at first null encountered.
For the issues that appear under Notes 5.x, there is the following workaround and a fix is being researched:
Call the function only once per variable and refer to the variable assigned to the value. For instance, from the example above, you would use the variable A rather than making the additional calls setting the variables B and C.
Related Documents:
For additional issues that involve the FullTrim function, refer to the following documents:
Notes Domino 6.0/6.0.1:
Might Not Be Able to Attend Sametime Meetings in Environment Running Domino 6.0/6.0.1 and Sametime 3.x (Document #1105532)
Notes Domino 5.x, 6.0, 6.01:
Domino 5.0.12 or 6.0.1 Server Crashes when Execute FullTrim and/or When Running Sametime 3.x (Document #1105890)
animate:
In diesem Problem gehts scheinbar nur um einzelene Strings, die der Funktion übergeben werden, wenn ich das jetzt beim Überfliegen richtig gecheckt habe.
das war nicht mein Problem.
ich wollte, wie sja, leere Elemente aus nem Array schmeißen.
Ich habe den Thread von damals mittlerweile gefunden:
sja:
Hallo,
Bernhard, vielen Dank für wichtigen Tip: ftarray(0) (leider habe ich nicht verstanden, wie man hier ein Zitat einträgt), ich werde das unbedingt prüfen und Ergebnisse mitzuteilen.
Übrigens eine ErrorHandler werde ich benutzen in dem Fall, wenn es nur eine einzige Adresse gibt und zwar falsch geschrieben. In diesem Fall denke ich kommt bestimmt Fehlermeldung, dass die Adresse ist nicht in dem Adressbuch gefunden. Das habe ich noch nicht getestet. Ich habe nur getestet den Fall, wenn es einige Adressen gibt und eine davon falsch ist. In diesem Fall läuft alles ohne Fehlermeldung.
Thomas, für Web habe ich das nicht getestet, da Web bei mir nicht geplant ist, aber im Client, wie gesagt, funktioniert es bei mir ohne Problem. Ich habe der Agent mit Fulltrim-Funktion lokal und auf dem Server getestet.
Client 6.0.2CF1 und 6.5.1
Server 6.0.2CF1
Noch mal herzlichen Dank für eure Hilfe. Ich weiss das zu schätzen, besonders, wenn in unserem grossen Unternehmen gib es kein Mensch, mit welchem ich über LotusNotes-Programmierung sprechen könnte.
Übrigens, da meine Muttersprache nicht Deutsch ist, klingen eventuell einige meine Ausdrücke komisch für euch, aber ich hoffe, dass ihr nicht zu streng zu mir werden. :)
Grüssen
Sofia
Navigation
[0] Themen-Index
[*] Vorherige Sete
Zur normalen Ansicht wechseln