371 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Forum | Blogs | Search | myPL | About 
 
Sorry, no records were found!
Latest 7 Posts
Pixels - wow! :-)
Sat, Apr 24th 2010 1
Happy Birthday to U
Thu, Apr 15th 2010 2
How to Become an Early Riser
Thu, Mar 4th 2010 2
LotusScript function to compare the items of two documents
Wed, Mar 3rd 2010 65
PickListStrings - Something Unexpected
Wed, Mar 3rd 2010 24
Formula-Agent and @Prompt
Tue, Mar 2nd 2010 20
LotusScript Quiz: the "+" operator
Mon, Mar 1st 2010 1
Top 10


LotusScript Quiz: the "+" operator
   

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?

Msgbox "1" + 1
A. "11".
B. 2.
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 seperator, 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 ;-)

---------------------
http://feedproxy.google.com/~r/marcusfoerster/~3/c7R7s0sRljI/lotusscript-quiz-operator.html
Mar 01, 2010
2 hits



Sorry, no records were found!
Recent Blog Posts




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - FAQ - Mobile Edition