VBScript in ASP Classic contains an int function. (He rounds the numbers to -∞.) Suppose that some overly "smart" encoder has created a global variable called "int". Is there any way to get the original function? I tried all kinds of workarounds with clipped and dodgy execs, but no dice. I suspect this is not possible, but I hope someone finds out more about it than I do.
EDIT: Thanks for the answers. As y'all asked, a global variable called "Int" (although, unfortunately, vbscript is not case sensitive) is the factory for a class like Java Integer. The default property is essentially a single argument constructor; that is, "Int (42)" gives a new IntClass object containing 42. The default property for IntClass, in turn, simply returns a raw number.
The creator tried to get around the lack of proper namespaces and static methods, and the solution was actually pretty seamless. Pass to IntClass where int is expected, and it will automatically activate the default property. I am trying to fix the last remaining seam: the outer code calling "int" will not be rounded properly (because the constructor uses CLng).
source
share