Line Continuation?

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
 
B

Bogdan Lachendro

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("")"
 
F

Fergus Cooney

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top