Previous Topic: weak external Command--Declare Native External Function (Cmdlet)Next Topic: base64Decode--Decode a base64 Encoded String (Function)


AutoShell Functions

This section details the AutoShell core functions. Functions define a set of processing instructions that receive zero or more arguments and return no value or exactly one value. Function arguments are passed in parentheses and must comply with JavaScript language syntax. Literal strings must be placed in quotation marks, and special characters inside the string (for example, backslashes) must be escaped.

Example

// Concatenate s n times
function repeat(s,n)
{
    var i;
    var ret="";
    for(i=0; i < n; i++)
        ret += s;
    return(ret);
}
? repeat("*", 10);
? repeat("\\", 25);