The IsFunctionSupported function checks whether a function is supported.
Function format:
IsFunctionSupported (name as string) as Boolean
Example:
#pragma ALLOW_UNRESOLVED_FUNCTIONS
If IsFunctionSupported ("OpenDetectedSoftwareOutputFiles") then
OpenDetectedSoftwareOutputFiles ("A7C1E14A-7C93-4E17-B4E5-45B796717F49", "V1", "OS Detection for Windows")
else
dsmtrace(“error”,”This version of dmscript does not support Intellisigs.”)
exit
end if
Input Parameters
This function has the following input parameter:
Specifies the name of the function.
Return Values
If the given function is either defined in the script or a built-in function, the function returns true; else, returns false. This function is used with the ALLOW_UNRESOLVED_FUNCTIONS pragma to allow scripts to handle backward compatibility. If a script uses a function that exists in the current release but not in previous releases, the script fails compilation and does not perform any action on computers running the old releases. IsFunctionSupported allows such a script to pass compilation on old releases and perform a special action at runtime to handle the missing feature. It is not possible to compensate for the missing function but an error message is displayed for the user.
Note: You can also use the GetFileInfo and CompareVersions functions to verify that the script is executing on a particular version of DMScript.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|