String literal in multiple lines

  • Thread starter Thread starter Andrus
  • Start date Start date
A

Andrus

I have long single line string literals containing " characters in code like

switch (expr) {
case @"IR(""xxx"")+sql('sele tasudok from dok x where
doktyyp+str(dokumnr,7)= ""G""+str(dok.krdokumnr,7) ','')":


For code readability I need to split them to multiple lines so that vlaue
remains same. I tried

switch (expr) {
case "IR(\"xxx\")+\
sql('sele tasudok from dok x \
where doktyyp+str(dokumnr,7)= \"G\"+\
str(dok.krdokumnr,7) ','')":

But got compile error. Any idea ?

Andrus
 
Andrus said:
I have long single line string literals containing " characters in code like

switch (expr) {
case @"IR(""xxx"")+sql('sele tasudok from dok x where
doktyyp+str(dokumnr,7)= ""G""+str(dok.krdokumnr,7) ','')":


For code readability I need to split them to multiple lines so that vlaue
remains same. I tried

switch (expr) {
case "IR(\"xxx\")+\
sql('sele tasudok from dok x \
where doktyyp+str(dokumnr,7)= \"G\"+\
str(dok.krdokumnr,7) ','')":

But got compile error. Any idea ?

Andrus

You got a reply here:

http://www.codeproject.com/script/comments/forums.asp?msg=2000859&forumid=1649#xx2000859xx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top