? Special character
The question mark is a special character that represents the Unknown value. ABL treats a quoted question mark (
"?"
) in a procedure or an input field as a question mark character. It treats an unquoted question mark (?
) in a procedure or an input field as an unknown value.Table 1 indicates the results when using the Unknown value (
?
) in a comparison expression (EQ, GE, GT, LE, LT, NE). These results are true for both character and integer variables.
Table 1: Using the Unknown value (?
) in comparison operations Comparison operator One argument is ? Both arguments are ? EQ or = F T GE or >= ? T GT or > ? F LE or <= ? T LT or < ? F NE or <> T F
Note: WebSpeed® treats an unquoted question mark (?
) in an HTML input field as a character.Additional points about the Unknown value (
?
) are:
- Any number of Unknown value (
?
) records can be in a unique index. This is useful in cases where you want to defer choosing key values for a unique index.- If you define a field as mandatory in the Dictionary, that field cannot contain the Unknown value (
?
) when the AVM writes the record to the database.- For sorting and indexing purposes, the Unknown value (
?
) sorts high.- The question mark (
?
) character in the first position of a field equals the Unknown value (?
), not a question mark.- When using the Unknown value (
?
) in a comparison expression for SQL, the result is unknown.- When using the Unknown value (
?
) in an expression, the result of that expression is usually unknown. For example, when you concatenate first, middle, and last names, and the middle name is?
, then the result is?
.For information on how the Unknown value (
?
) works with logical data types, comparison operators, and conditional statements, see the following reference entries: EQ or = operator, GE or >= operator, GT or > operator, IF...THEN...ELSE statement, LE or < = operator, LT or < operator, NE or <> operator
OpenEdge Release 10.2B
|