tips:revmedia:subs3

BALANCED

Published ByDateVersionKnowledge LevelKeywords
Revelation Technologies14 NOV 19892.XEXPERTBALANCED

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

BALANCED(string)

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.

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.

  • The following code demonstrates different ways of using 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
  • tips/revmedia/subs3.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1