Well, I'm trying to understand the limitations in expressions Constin VBScript. I could not use anything but literals. What docs say :
A literal or other constant, or any combination that includes all arithmetic or logical operators except Is .
So, if "includes all arithmetic or logical operators", then logically I expect that I can do something like this:
Const X = (1 + 2)
But this leads to the "Expected literal constant" error. I found an interesting answer here that allows you to cheat at some level, so the above can be done with:
Execute "Const X = " & (1 + 2)
But my question is about declaring a standard constant. If by chance the documents said something like "the expression could be ONLY literal," then I would never ask.
So what else can I use (other than literal)?
source
share