Remark after a & _

Discussion in 'Basic4ppc Wishlist' started by Scubaticus, Mar 11, 2009.

  1. Scubaticus

    Scubaticus Active Member Licensed User

    I would like to have the possibility to place a remark after a line break (& _) so remarks like this
    Code:
    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.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Which error do you get?
    The following code runs fine:
    Code:
    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
     
  3. Scubaticus

    Scubaticus Active Member Licensed User

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

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

            Station(
    2) & _ 'Station Sat
            "')"
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice