String literal cheat sheet
Posted: Thu Oct 12, 2017 3:49 am
Hey guys,
So this isn't really much of a question but more of a what do you think post...
So I was screwing around with my message box that popup errors for logging in.
I wanted to format the text in the message where there is a new line between sentences int he message.
Coming from the world of Javas, Python and C, I figured that I just stick a /n in my string and everything would be good.
But, in LANSA, it actually took my /n literally.
So digging around in the forum searching for new line I found this post
viewtopic.php?f=3&t=1399&p=2928&hilit=new+line#p2928
So now my message shows up the way I like it.
One thing thats bugging me about this was hunting for this on the doco site.
First you have to search for carriage return (not new line) to find something about this.
http://docs.lansa.com/14/en/lansa016/PR ... INSICS.htm
Then when you find asUnicodeString, turns out thats under the Integer Primitive.
I get that you are modding a integer to a special character but my brain was working with strings so I wouldn't think to look there.
*/ Rant mode: offline */
Anyway I was thinking that to make this much easier for the future LANSA n00bs out there (like myself
), I'd think it be great to have a LANSA Literal character translator.
Just a page in the doco that says, here is all the basic literals in LANSA and quick examples in how to use them.
Want to use /n? use (10).AsUnicodeString
How about /t? use (9).AsUnicodeString
What do you guys think?
So this isn't really much of a question but more of a what do you think post...
So I was screwing around with my message box that popup errors for logging in.
I wanted to format the text in the message where there is a new line between sentences int he message.
Coming from the world of Javas, Python and C, I figured that I just stick a /n in my string and everything would be good.
But, in LANSA, it actually took my /n literally.
So digging around in the forum searching for new line I found this post
viewtopic.php?f=3&t=1399&p=2928&hilit=new+line#p2928
So now my message shows up the way I like it.
One thing thats bugging me about this was hunting for this on the doco site.
First you have to search for carriage return (not new line) to find something about this.
http://docs.lansa.com/14/en/lansa016/PR ... INSICS.htm
Then when you find asUnicodeString, turns out thats under the Integer Primitive.
I get that you are modding a integer to a special character but my brain was working with strings so I wouldn't think to look there.
*/ Rant mode: offline */
Anyway I was thinking that to make this much easier for the future LANSA n00bs out there (like myself
Just a page in the doco that says, here is all the basic literals in LANSA and quick examples in how to use them.
Want to use /n? use (10).AsUnicodeString
How about /t? use (9).AsUnicodeString
What do you guys think?