07.05.2015 Views

Download - True BASIC

Download - True BASIC

Download - True BASIC

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

212 <strong>True</strong> <strong>BASIC</strong> Language System<br />

Relational expressions are formally defined as:<br />

relational-expr::<br />

numex relop numex<br />

strex relop strex<br />

Where the allowed relational operators are:<br />

relop:: <<br />

= or =><br />

><br />

or ><<br />

A numeric relational expression numex relop numex is “true” if and only if the order relation specified by the relop<br />

between the two numexs is “true.” The usual real number ordering relation is used.<br />

A string relational expression strex relop strex is “true” if and only if the order relation specified by the relop<br />

between the two strexs is “true.”<br />

The ordering relation for strings is determined by the numeric values of the ASCII code. (For those characters not<br />

in the ASCII code, the numeric values are determined by the operating system; see Appendix A.) When two strings<br />

are compared, the first character of each is examined. If the first character in the first string occurs earlier in the<br />

numeric code sequence than the first character in the second string, then the first string as a whole is considered<br />

less than () the second<br />

string. If the first characters are the same, then the second characters are examined in a like manner. If the<br />

strings have the same number of characters and the characters are the same, position by position, the two strings<br />

are considered equal (=). If the first string is shorter than the second string, but the characters match up through<br />

the number of characters in the first string, then the first string is considered less than (

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!