|
balance
|
The balance function locates the sub-string (if any) of the
source string {sourceString}, starting at the specified displacement
{startPos}, that is enclosed by parentheses. If the specified source start
location is not enclosed by parentheses, the balance function returns the Boolean
value false. When to use Since the Lisp language is heavily (like all Lisp dialects) involved with matching
open and close parentheses, this function can be used often during automated Script
editing.
(balance sourceString startPos) If the specified source string starting at the specified position, is balanced,
then the return value is the substring containing the balanced expression.
If the string is not balanced, then the Boolean value false is returned.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types sourceString Source String that contains a Lisp expression String startPos An integer value that represents the starting position to determine if
the expression is balanced. Integer
Returns:
Examples
Argument Types
Lambda
String
Integer
How do I contact the AIS team?