micheleBr Member Licensed User Longtime User Jan 2, 2013 #1 Good morning, I want set a string variable with something like: <p><span style="color: #ff9900; font-family: comic sans ms,sans-serif; font-size: xx-large;">test!</span></p> But where there are this character: " I have an error... Help please !!! tnx!
Good morning, I want set a string variable with something like: <p><span style="color: #ff9900; font-family: comic sans ms,sans-serif; font-size: xx-large;">test!</span></p> But where there are this character: " I have an error... Help please !!! tnx!
mc73 Well-Known Member Licensed User Longtime User Jan 2, 2013 #2 You can use the static variable QUOTE or chr(34). Never the less, I think I saw an Erel's post these days, where is said that we can insert the " inside a string, but I cannot remember right now the link :sign0013: Upvote 0
You can use the static variable QUOTE or chr(34). Never the less, I think I saw an Erel's post these days, where is said that we can insert the " inside a string, but I cannot remember right now the link :sign0013:
Erel B4X founder Staff member Licensed User Longtime User Jan 2, 2013 #3 In your case you can also use single quotes (') instead of double quotes. Starting from v2.50 you will be able to write quotes inside strings: Basic4android v2.50 BETA is released! Upvote 0
In your case you can also use single quotes (') instead of double quotes. Starting from v2.50 you will be able to write quotes inside strings: Basic4android v2.50 BETA is released!
mc73 Well-Known Member Licensed User Longtime User Jan 2, 2013 #4 Erel said: In your case you can also use single quotes (') instead of double quotes. Click to expand... This is true. In general, I've seen some inconsistencies moving from " to ', I think it was in javaScript, but can't remember now exactly. Anyway, nothing to do with b4a (actually seen it in php's echo). Upvote 0
Erel said: In your case you can also use single quotes (') instead of double quotes. Click to expand... This is true. In general, I've seen some inconsistencies moving from " to ', I think it was in javaScript, but can't remember now exactly. Anyway, nothing to do with b4a (actually seen it in php's echo).
Sortec Member Licensed User Longtime User May 21, 2013 #6 Moderator, please delete this post Last edited: May 21, 2013 Upvote 0
nicholas.jj.taylor Member Licensed User Longtime User May 21, 2013 #7 For a single ", you can insert "" Eg. Code: Dim StrHelloWorld = "I love to type ""Hello world""" The string stored is: I love to type "Hello world" Click to expand... Upvote 0
For a single ", you can insert "" Eg. Code: Dim StrHelloWorld = "I love to type ""Hello world""" The string stored is: I love to type "Hello world" Click to expand...