Changes between Version 1 and Version 2 of League
- Timestamp:
- Mar 23, 2010, 5:26:10 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
League
v1 v2 59 59 }}} 60 60 61 === Equivalence and compar ison===61 === Equivalence and compare === 62 62 63 There are several kinds of important equivalence for strings , and it is a reason why there is no "=" operator for Universal_String. Instead you can use Is_Binary_Equal function for binary equivalence detection. For the same reason there are no other predefined comparison operators for Universal_String. The function Binary_Compare can be used to compare two string in binary order.63 There are several kinds of important equivalence for strings. "Default" equivalence and compare are based on binary order of code points. 64 64 65 65 === Collation === … … 79 79 80 80 begin 81 case Binary_Compare (S1, S2) is 82 when Less => 83 Put_Line ("Binary comparison: less"); 81 if S1 < S2 then 82 Put_Line ("Binary comparison: less"); 84 83 85 when Equal =>86 84 elsif S1 = S2 then 85 Put_Line ("Binary comparison: equal"); 87 86 88 when Greater =>89 87 else 88 Put_Line ("Binary comparison: greater"); 90 89 end case; 91 90