Table of Contents

BALANCED

Published ByDateVersionKnowledge LevelKeywords
Revelation Technologies14 NOV 19892.XEXPERTBALANCED

BALANCED

BALANCED is an external function that converts a string to uppercase for internal processing.

BALANCED(string)

Using BALANCED

The string will not be converted if unbalanced quotation marks exist.

string

String is the string to be converted to uppercase characters. If a nested string exists in string, it will not be converted. If the conversion is not successful, the string value is cleared. String will contain the converted string upon successful completion.

Values returned

BALANCED returns true and passes the converted string in string if the conversion was successful, otherwise false is returned and null is passed in string. An unsuccessful conversion indicates unbalanced quotes.

Correct Use of BALANCED

DECLARE FUNCTION BALANCED
DECLARE SUBROUTINE MSG

*A simple conversion

string = "101 Villa Lane"
flag = BALANCED(string)
IF flag THEN
    MSG("string = %1%|flag = %2%","","", string:@FM:flag)
END

* A nested string conversion
string = "'e.e.' Cummings"
flag = BALANCED(string)
IF flag THEN
    MSG("string = %1%|flag = %2%","","", string:@FM:flag)
END