W wheretheidivides Active Member Licensed User Longtime User Jan 3, 2013 #1 How do you split code onto 2 different lines? Is there a special character you need at the end of a line? Now that was easy.
How do you split code onto 2 different lines? Is there a special character you need at the end of a line? Now that was easy.
giga Well-Known Member Licensed User Longtime User Jan 3, 2013 #2 Are you looking for CRLF ?? Upvote 0
mangojack Expert Licensed User Longtime User Jan 3, 2013 #3 B4X: "This is a very long line of code FROM sqlite_master" _ & " WHERE Type = 'table' AND name ='contacts'") = 0 Then [end code] Worked for me Cheers mj Upvote 0
B4X: "This is a very long line of code FROM sqlite_master" _ & " WHERE Type = 'table' AND name ='contacts'") = 0 Then [end code] Worked for me Cheers mj
W wheretheidivides Active Member Licensed User Longtime User Jan 3, 2013 #4 So an underscore at the end of the line. Cool. Thanks. Upvote 0
mangojack Expert Licensed User Longtime User Jan 3, 2013 #5 An Underscore at the end of the line and Ampersand at start of second line. also watch you spacing . obviously KeyWords cant be split. Cheers mj Upvote 0
An Underscore at the end of the line and Ampersand at start of second line. also watch you spacing . obviously KeyWords cant be split. Cheers mj
Erel B4X founder Staff member Licensed User Longtime User Jan 3, 2013 #6 The ampersand is not part of the "line continuation character (_)". Upvote 0
mangojack Expert Licensed User Longtime User Jan 3, 2013 #7 Erel .. Its been a long time since I needed to use this I get a syntax error with all attempts not containing ampersand ??? Cheers mj Upvote 0
Erel .. Its been a long time since I needed to use this I get a syntax error with all attempts not containing ampersand ??? Cheers mj
Erel B4X founder Staff member Licensed User Longtime User Jan 3, 2013 #8 Ampersand is required when you concatenate strings: B4X: Dim s As String = "a" & "b" Dim s2 As String = "a" _ & "b" Sub s1(x As Int, _ 'no ampersand here. y As Int) Upvote 0
Ampersand is required when you concatenate strings: B4X: Dim s As String = "a" & "b" Dim s2 As String = "a" _ & "b" Sub s1(x As Int, _ 'no ampersand here. y As Int)
mangojack Expert Licensed User Longtime User Jan 3, 2013 #9 Thanks Erel for the clarification .. Cheers mj Upvote 0
W wheretheidivides Active Member Licensed User Longtime User Jan 3, 2013 #10 Thanks for you alls quick response. I learned javascript and it's the same but the code is different. I knew it was something simple. Upvote 0
Thanks for you alls quick response. I learned javascript and it's the same but the code is different. I knew it was something simple.