End of line characters

Hiya,I’m just starting my LotusScript journey, and am hitting an easy problem. Using release 8 domino.

I’m writing an agent which creates a string, to be sent as XML/JSON so I am building the string up, and then sending the Content-Type header, and finally printing the string. I would like to add end of line characters (I dont mind which one \n or \r\n) but I cannot find a way to do this!

so here’s some code to show what I mean

Dim outputJSON As String

outputJSON = |<!–|

outputJSON = outputJSON + |var json_message = {|

outputJSON = outputJSON + …

Print “Content-Type: application/x-javascript”

Print outputJSON

so of course there need to be line endings. I tried “\n” and |\n| and a few other things including looking at the stream class, which appears to be geared to file operations, and the Chr function, and of course google.

What I cannot have is a series of Print statements, I want to store the entire output as a string before Printing it, so I can encode parts of it and perform checks on the final string before sending it.

LotusScript seems altogether very poor, and I guess I need to move to Java ASAP, but for now please put me out of my misery!

Thanks in advance.

Subject: end of line characters

Two thing you can try:

String outputJSON = |<!–|

outputJSON = outputJSON + chr(13) + |var json_message = {|

outputJSON = outputJSON + chr(13) + … Print “Content-Type: application/x-javascript”

chr(13) referes to to ascii table, chr(10) should work too.

Or just do:

String outputJSON = |

 <script type="text/javascript">

 var json_message = blabla;

 </script>|

Using pipes do determine your string would include ant breaks made within.