Line Continuation?

  • Thread starter Thread starter Jasper Recto
  • Start date Start date
J

Jasper Recto

I have a statement that I can't seem to use Line Continuations on it:

Progress = "V:\PROGRESS\bin\prowin32.exe V:\VANTAGE\db\vantage.db_ -ininame
V:\VANTAGE\vantage.ini -pf V:\VANTAGE\db\Vantage.pf -N TCP -H loc-vntg -S
epic52 -ld vantage -p v:\" & ReportPath & ReportName & " -rand 2 -q -basekey
ini"

This is all one line and when I try to use line continuation ( _ ) I keep
getting errors.

Any ideas?
Thanks,
Jasper
 
Progress = "V:\PROGRESS\bin\prowin32.exe V:\VANTAGE\db\vantage.db_ -ininame
V:\VANTAGE\vantage.ini -pf V:\VANTAGE\db\Vantage.pf -N TCP -H loc-vntg -S
epic52 -ld vantage -p v:\" & ReportPath & ReportName & " -rand 2 -q -basekey
ini"

Progress = "V:\PROGRESS\bin\prowin32.exe V:\VANTAGE\db\vantage.db
-ininame " & _
"V:\VANTAGE\vantage.ini -pf V:\VANTAGE\db\Vantage.pf -N TCP -H " & _
"loc-vntg -S epic52 -ld vantage -p """ & ReportPath & ReportName & _
""" -rand 2 -q -basekeyini("")"
 
Hi Jasper,

Line continuations only work between elements - you can't break an element.

I'm sure that this will look wrong to you:
Dim I As Integer = 12345 _
67890
because you can't break a number up like that.

Strings are exactly the same - they can't be split. But you can, as Bogdan showed, split a string into two or more
separate strings, and then do a series of concatenations.

Regards,
Fergus
 
Back
Top