As you (if you are a LotusScript developer ;-)) know,
- Msgbox "a" + 3 results in a type mismatch error.
- Msgbox "a" & 3 delivers "a3".
Now, do you know what the result of this line of code is?
C. A type mismatch error occurs
Solution: B - LotusScript tries to parse the string, and adds the two values.
This also works with strings like "1.1" or "1,1". In my Notes environment "," is the decimal separator, so "1,1" + 1 results in 2,1 and "1.1" + 1 results in... 12.
The code does not work, however, with "1a" + 1, even though val("1a") returns 1. LotusScript seems to parse the string differently here - mh...
Still... please do NOT use this - this is evil coding ;-)About the Author
Marcus Foerster works as Systems Architect for Pentos AG in Munich, Germany. His focus lies on the application side, creating collaboration systems for users, groups and enterprises to get their daily work done. This approach includes integrating complex workflows with intuitive user interfaces, using Lotus Notes/Domino with Adobe Flex and other Web technologies.
Read more in Marcus' blog: http://marcus.foerster.com/blog