Well, I try to understand limitations in Const
expressions in VBScript
. I was not able to use anything except literals. What the docs say is:
Literal or other constant, or any combination that includes all arithmetic or logical operators except Is.
So, if "that includes all arithmetic or logical operators" then logically I expect I can do something like this:
Const X = (1 + 2)
But that brings the error "Expected literal constant". I found an interesting answer here that allows one to cheat, at some level, so the above can be done with:
Execute "Const X = " & (1 + 2)
But my question is about standard constant declaration. If by chance the docs said something like "expression could be ONLY literal", then I would never ask.
So what Else I can use (besides literal)?
Script56.chm says the following in the Remarks section:
The bit in italics above makes a nonsense of the "or any combination that includes all arithmetic or logical operators except Is" claim.