Remark after a & _

Scubaticus

Active Member
Licensed User
I would like to have the possibility to place a remark after a line break (& _) so remarks like this
B4X:
   Sql = "Insert into TVG (Ndx, Name, Sat, ...) Values('" & _
      Station(0) & _ 'Station Index
      Station(1) & _ 'Station Name
      Station(2) & _ 'Station Sat
      .........
      "')"
would give me no syntax error anymore.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Which error do you get?
The following code runs fine:
B4X:
Sub Globals
    'Declare the global variables here.
    Dim station(3)
End Sub

Sub App_Start
    station(0) = "a" : station(1) = "b" : station(2) = "c"
    Sql = "Insert into TVG (Ndx, Name, Sat, ...) Values('" & _
        Station(0) & _ 'Station Index
        Station(1) & _ 'Station Name
        Station(2) & _ 'Station Sat
        "')"
        Msgbox(sql)
End Sub
 

Scubaticus

Active Member
Licensed User
I got a syntax error, but it was my fault. I had a blank line between the code:

B4X:
    Sql = "Insert into TVG (Ndx, Name, Sat, ...) Values('" & _
        Station(0) & _ 'Station Index
        Station(1) & _ 'Station Name

        Station(2) & _ 'Station Sat
        "')"
 
Top