473,320 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

String literal in multiple lines

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
Apr 22 '07 #1
1 2902
Andrus wrote:
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/co...49#xx2000859xx

--
Göran Andersson
_____
http://www.guffa.com
Apr 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Don Starr | last post by:
When applied to a string literal, is the sizeof operator supposed to return the size of the string (including nul), or the size of a pointer? For example, assuming a char is 1 byte and a char *...
7
by: al | last post by:
char s = "This string literal"; or char *s= "This string literal"; Both define a string literal. Both suppose to be read-only and not to be modified according to Standard. And both have...
12
by: weaselboy1976 | last post by:
Hello, If we have c code like what's below, we will get an error because in the stringManipulator function we attempt to modify a string literal on the second call to the function. My question...
1
by: larrylyons | last post by:
I don't understand why I'm getting Unterminated String Literal error MY JAVASCRIPT function test(){ newWindow =...
4
by: Water Cooler v2 | last post by:
Besides embedding <BR/>, like general purpose programming languages, I thought you could embed escape sequences such as \n or \r\n into string arguments to cause line breaks in JavaScript. To...
17
by: lovecreatesbeauty | last post by:
1. In the following code, is the code (line 11) legal? Is there a notice in the document to tell callers that the parameter s1 should receive an array variable, i.e. type char, but not a variable...
2
by: PengYu.UT | last post by:
Hi, In python, triple quote (""") can be used to quote a paragraph (multiple lines). I'm wondering if there is any equivalent in C++. For the following code, I could write the long string in a...
1
by: kru | last post by:
Hi All, Simple issue I cannot figure out. I have a multiline textbox, I need to convert the string contents of this textbox into a single line string which I currently write to a textfile. ...
1
by: mohan lal | last post by:
Hi, I have a variable in php $test = "This is a string It has multiple lines there are three total" ; (Output from a text area) I want to pass this variable to a javascript function
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.