FastScript - Possible JScript Improvements
Hello people, I'm testing some items using the JScript engine of FastString, and found some minor things - I'm using the FastScript 1.9 than comes with FastReport - so, maybe, they're fixed in any other version.
JScript accept both ' and " as strings delimiters, a = "string" compiles and run fine, a = 'string' returns a "expression expected" error. For compatibility both delimiters must work.
The support for OLE miss a 'almost-undocumented' feature, the "DISPATCH_CONSTRUCT" flag (along DISPATCH_METHOD/DISPATCH_PROPERTYGET/DISPATCH_PROPERTYPUT/DISPATCH_PROPERTYPUTREF). So, a call with "new" operator in JScript over a OLE object must invoke using construct flag, passing parameters like a method call (Currently, It's throw a "Class Required Error").
I'm asking these small things 'cause I have currently things running in IActiveScript - the application is 80% dynamic with data dictionaries - and notice these differences. Everything else works as expected, calling the objects boxed into IDispatch and so on.
JScript accept both ' and " as strings delimiters, a = "string" compiles and run fine, a = 'string' returns a "expression expected" error. For compatibility both delimiters must work.
The support for OLE miss a 'almost-undocumented' feature, the "DISPATCH_CONSTRUCT" flag (along DISPATCH_METHOD/DISPATCH_PROPERTYGET/DISPATCH_PROPERTYPUT/DISPATCH_PROPERTYPUTREF). So, a call with "new" operator in JScript over a OLE object must invoke using construct flag, passing parameters like a method call (Currently, It's throw a "Class Required Error").
I'm asking these small things 'cause I have currently things running in IActiveScript - the application is 80% dynamic with data dictionaries - and notice these differences. Everything else works as expected, calling the objects boxed into IDispatch and so on.