VBScript, purpose of colon?

后端 未结 4 1385
灰色年华
灰色年华 2021-02-03 22:51

What is the purpose of the colon?

e. g.:

Dim objConn : Set objConn = OpenConnection()`

Is the colon used to combine the two statements

4条回答
  •  北海茫月
    2021-02-03 23:47

    You can put two (or more) lines of code in one line. It's most often used, as in your example, to declare and set a variable on one line.

    Think of it like a semicolon in every other language, except optional.

提交回复
热议问题