How can I create a multiline string in BasicMaker?
Thanks in advance.
Multiline strings
Re: Multiline strings
Please check our BasicMaker manual for guidance on data types.
Re: Multiline strings
My apologies, but that doesn't answer my question. Here's an example of a multiline string:
"I am a string that contains carriage returns.
As you can see, I also contain more than one paragraph.
I also contain special characters like %, \, /, $ and @.
Everything from the first double quote to the closing double quote is part of the multiline string.
String ends after the double quote ... "
Strings with carriage returns and special characters are supported to various degrees in all serious programming languages.
I want to create a variable for BasicMaker that contains a multiline string.
Thank you.
"I am a string that contains carriage returns.
As you can see, I also contain more than one paragraph.
I also contain special characters like %, \, /, $ and @.
Everything from the first double quote to the closing double quote is part of the multiline string.
String ends after the double quote ... "
Strings with carriage returns and special characters are supported to various degrees in all serious programming languages.
I want to create a variable for BasicMaker that contains a multiline string.
Thank you.
Re: Multiline strings
I have discovered a reasonable workaround for BasicMaker multiline strings.
Code: Select all
Sub Main
Dim lStr$
lStr$ = ""
lStr$ = lStr$ & "This is a long block of text that I want to fill "
lStr$ = lStr$ & "into a form field. I need to make sure I pay attention "
lStr$ = lStr$ & "to spacing and carriage return issues while doing so. "
lStr$ = lStr$ & "I also have to use quotes liberally, the concatenation "
lStr$ = lStr$ & "operator, and the continuance underscore to make sure "
lStr$ = lStr$ & "BasicMaker can parse my code." & Chr(10) & Chr(13)
lStr$ = lStr$ & "It's kind of a pain" & Chr(10) & Chr(13) & "and I wish I could use "
lStr$ = lStr$ & "a heredoc instead, letting me copy and paste the block"
lStr$ = lStr$ & "of text I need from another source and shove it into "
lStr$ = lStr$ & "a string."
MsgBox lStr$
End Sub