Erel B4X founder Staff member Licensed User Longtime User Jan 21, 2015 #1 What is the output of this code?
thedesolatesoul Expert Licensed User Longtime User Jan 21, 2015 #2 Example 1 Example "2" Example 3: The "value" of FirstTime is True. 10 / 3 = 3.33 Sin (45) = 2.72 Today is 21/01/2015 Are you sure this works? It seems like a perl/tcl expression evaluation within strings.
Example 1 Example "2" Example 3: The "value" of FirstTime is True. 10 / 3 = 3.33 Sin (45) = 2.72 Today is 21/01/2015 Are you sure this works? It seems like a perl/tcl expression evaluation within strings.
Erel B4X founder Staff member Licensed User Longtime User Jan 21, 2015 #3 You are almost correct. I see three mistakes (one is not really related). thedesolatesoul said: Are you sure this works? Click to expand... It will in the next version. This is a new string literal that makes it easier to create strings. The three main advantages: multiline, (formatted) string interpolation and no need to escape quotes. Last edited: Jan 22, 2015
You are almost correct. I see three mistakes (one is not really related). thedesolatesoul said: Are you sure this works? Click to expand... It will in the next version. This is a new string literal that makes it easier to create strings. The three main advantages: multiline, (formatted) string interpolation and no need to escape quotes.
Erel B4X founder Staff member Licensed User Longtime User Jan 21, 2015 #4 The equivalent code: There is a missing quote in line 37...
thedesolatesoul Expert Licensed User Longtime User Jan 21, 2015 #6 Insane. Now lets see who spots the three mistakes. (I didnt!)
MikeH Well-Known Member Licensed User Longtime User Jan 21, 2015 #7 Example 1 Example 2 Example 3: The value of FirstTime is True. 10 / 3 = 3.33 Sin (45) = 2.72 Today is 21/01/2015
Example 1 Example 2 Example 3: The value of FirstTime is True. 10 / 3 = 3.33 Sin (45) = 2.72 Today is 21/01/2015
Erel B4X founder Staff member Licensed User Longtime User Jan 22, 2015 #8 Correct answer: Example 1 Example "2" Example 3: The "value" of FirstTime is true. 10 / 3 = 3.3333333333333335 Sin (45) = 0.71 Today is 01/22/2015
Correct answer: Example 1 Example "2" Example 3: The "value" of FirstTime is true. 10 / 3 = 3.3333333333333335 Sin (45) = 0.71 Today is 01/22/2015
thedesolatesoul Expert Licensed User Longtime User Jan 22, 2015 #10 Erel said: 10 / 3 = 3.3333333333333335 Click to expand... Interesting.
S sorex Expert Licensed User Longtime User Jan 22, 2015 #11 @Erel : just wondering... what is the point of these $ wrapped around the string in the first line? why don't you need double quotes there like we need for normal strings?
@Erel : just wondering... what is the point of these $ wrapped around the string in the first line? why don't you need double quotes there like we need for normal strings?
LucaMs Expert Licensed User Longtime User Jan 22, 2015 #12 Erel said: What is the output of this code? Click to expand... Before reading all the posts and especially before answering, I should find out why you do not get compile errors, since I do not know the use of that $ !!! Is it B4A???
Erel said: What is the output of this code? Click to expand... Before reading all the posts and especially before answering, I should find out why you do not get compile errors, since I do not know the use of that $ !!! Is it B4A???
LucaMs Expert Licensed User Longtime User Jan 22, 2015 #13 Read post #3, Luca !!! So, we will have a new operator called: "SmartDollar". If I wake up, can I (we) suggest other "features" of that operator? Last edited: Jan 22, 2015
Read post #3, Luca !!! So, we will have a new operator called: "SmartDollar". If I wake up, can I (we) suggest other "features" of that operator?
S sorex Expert Licensed User Longtime User Jan 22, 2015 #17 any chance that this would be the default for all string operations? PHP also has this variables in strings method ( echo "the time is $now in {$myarray[0]}"; ) easier (to read) than all the concating
any chance that this would be the default for all string operations? PHP also has this variables in strings method ( echo "the time is $now in {$myarray[0]}"; ) easier (to read) than all the concating
Erel B4X founder Staff member Licensed User Longtime User Jan 22, 2015 #18 sorex said: any chance that this would be the default for all string operations? Click to expand... This may break existing code. Note that the IDE will autocomplete the closing $" automatically so it is really simple to use the new string literal instead of the standard one.
sorex said: any chance that this would be the default for all string operations? Click to expand... This may break existing code. Note that the IDE will autocomplete the closing $" automatically so it is really simple to use the new string literal instead of the standard one.
LucaMs Expert Licensed User Longtime User Jan 22, 2015 #19 Erel said: The equivalent code: There is a missing quote in line 37... Click to expand... There is (are) a missing underscore, ampersand and CrLf in... many lines! (31-33)
Erel said: The equivalent code: There is a missing quote in line 37... Click to expand... There is (are) a missing underscore, ampersand and CrLf in... many lines! (31-33)
Erel B4X founder Staff member Licensed User Longtime User Jan 22, 2015 #20 Nothing is missing. The new string literal supports multiline strings.