#1 2016-03-20 15:00:13

Zeng Jinsong
Member
Registered: 2016-01-19
Posts: 14

How to present the EndOfLine string?

How to present the EndOfLine string?

In VB, it is  chr(13) & chr(10)
In C, it is "\r\n"

But in AppBuilder, how to present it?

Thanks a lot. smile

Offline

#2 2016-03-20 15:18:09

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How to present the EndOfLine string?

Hello Zeng,

Thanks for posting and for your interest in my work at App Builder. The characters to be used in Javascript are "\r" for return carriage and "\n" for new line. What is your scenario or, in other words, where you need to use such characters?

Offline

#3 2016-03-20 15:28:43

Zeng Jinsong
Member
Registered: 2016-01-19
Posts: 14

Re: How to present the EndOfLine string?

Thanks a lot, I got it.

I wrote a function to append messages in a textarea control, like this:

NewDate "" "" "now"
DateFormat "[now]" "YYYY-MM-DD HH:mm:SS" "[sNow]"
SetVar "[msgType]" "Info" "String"
if "[iMsgType]" "==" "1"
  setvar "[msgType]" "Warning" "String"
endif
if "[iMsgType]" "==" "2"
  SetVar "[msgType]" "ERROR" "String"
endif

SetVar "[Line]" "[sNow] - [msgType]:[sMessage]" "String"
SetVar "[txtMessage.Value]" "[txtMessage.Value][Line]\r\n" "String"

I used "\r\n" directly and it works well. tongue

Offline

#4 2016-03-20 15:33:34

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How to present the EndOfLine string?

Hello Zeng,

Yes; certainly you can use "\r\n" and probably "\n" along also can works for your desired results.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.