Foundation > Rogue Wave Script Language Reference > Functions
 
Functions
The topics are:
*Rogue Wave Script Functions
*Function Methods
Rogue Wave Script Functions
In Rogue Wave 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 variables or into objects properties, etc.
For example, the function parseInt is actually 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
The only method of functions is:
Rogue Wave Script Function Method
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]"

Version 6.2.1
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.