Has somebody seen this strange behavior on Lotus Scripting. Please check this out:
Print “Double” & (Cdbl(“0.75”)+Cdbl(“0.75”))
Results in: R6=1.5 in R5=150
Print “Double” & (Cdbl(“0,75”)+Cdbl(“0,75”))
Results in: R6=150 in R5=1,5
Am i missing something here ???
Anybody seen this behavior too ??
Regards,
Pascal Dreissen
Subject: Strange behaviour
I am working on the same problem. I am beginning to suspect it has something to do with the language packs.My customer uses an AS/400. In R5 it worked as expected, in R6 he had problems in this situation:
Data is imported by a scheduled agent from a notesdatabase which contains imported data from a financial application into Domino as string e.g. “1200,7”. Why a string you ask, I don’t know.
Converting to double gives a typemismatch, so I tried to replace the “,” with the “.”, it worked… I thought. But the value was imported as 12007 (10x the original value)…
In the notesclient (either R5 or R6) the code in the agent runs fine.
I “solved” it by
-
test if numeric: if not
-
pos = instr(value , “,”)
-
adding a zero if 1 char after pos (1200,70)
-
part1 = left$(value , pos)
-
part2 = right$(value , 2)
-
numval = cdbl(part1) + cdbl(part2)/100
But what is the meaning of the function ConverttoDouBLe (CDBL) now?
If anyone has any clue please share it with me
Regards
Walter Mobach