IBM ILOG Script functions
Describes the use of functions in IBM ILOG Script.
In IBM ILOG Script, functions are regular values (also known as first
class
values) which can be manipulated like any other type of
value: They can be passed to functions, returned by functions, stored
into script variables or into object properties, and so on.
For example, the function parseInt is a function
value which is stored in the parseInt variable:
parseInt ->
a function value
This function value can be, for example, assigned to another variable:
myFunction = parseInt
and then called through this variable:
myFunction("-25") -> -25
Function methods
There is only one method of functions.
| Syntax | Effect |
|---|---|
| function.toString() | Returns a string which contains some information about the function. Examples: "foo".substring.toString() "[primitive method substring]" eval.toString() "[primitive function eval]" |