S
S
sky1442014-09-06 18:33:50
Visual Basic
sky144, 2014-09-06 18:33:50

VBS how to write code in one line?

I need to write a single line loop in VBS. This is real?
Here is an example of a loop of three lines
for i=1 to 5
msgbox (i)
next
Is it possible to fit them into one line?
When you try to do this without special characters, the script swears.
What I mean by special characters are characters that would help delimit the code on one line.
For example, there is such a thing (only in the opposite direction) in VBA, when you have a long line, you just write an underscore, press enter and continue writing from a new line, but when compiled, it will all go on one line.
And I would like to know if there is such a disconnect character in VBS, or some other solution to cram everything into one line.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexxander, 2014-09-06
@sky144

And ":" wouldn't it work? This is Basic.

S
sky144, 2014-09-06
@sky144

In VBS, the underscore character for newlines also works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question