Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,28 +0,0 @@
|
|||
with Ada.Text_IO, Ada.Strings.Equal_Case_Insensitive;
|
||||
|
||||
procedure String_Compare is
|
||||
|
||||
procedure Print_Comparison (A, B : String) is
|
||||
begin
|
||||
Ada.Text_IO.Put_Line
|
||||
("""" & A & """ and """ & B & """: " &
|
||||
(if A = B then
|
||||
"equal, "
|
||||
elsif Ada.Strings.Equal_Case_Insensitive (A, B) then
|
||||
"case-insensitive-equal, "
|
||||
else "not equal at all, ") &
|
||||
(if A /= B then "/=, " else "") &
|
||||
(if A < B then "before, " else "") &
|
||||
(if A > B then "after, " else "") &
|
||||
(if A <= B then "<=, " else "(not <=), ") &
|
||||
(if A >= B then ">=. " else "(not >=)."));
|
||||
end Print_Comparison;
|
||||
begin
|
||||
Print_Comparison ("this", "that");
|
||||
Print_Comparison ("that", "this");
|
||||
Print_Comparison ("THAT", "That");
|
||||
Print_Comparison ("this", "This");
|
||||
Print_Comparison ("this", "this");
|
||||
Print_Comparison ("the", "there");
|
||||
Print_Comparison ("there", "the");
|
||||
end String_Compare;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
"hello" = "hello" *> equality
|
||||
"helloo" <> "hello" *> inequality
|
||||
"aello" < "hello" *> lexical ordering
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
FUNCTION STANDARD-COMPARE("hello", "hello") *> "="
|
||||
FUNCTION STANDARD-COMPARE("aello", "hello") *> "<"
|
||||
FUNCTION STANDARD-COMPARE("hello", "aello") *> ">"
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
"hello " = "hello" *> True
|
||||
X"00" > X"0000" *> True
|
||||
|
|
@ -2,19 +2,19 @@ import extensions;
|
|||
|
||||
compareStrings = (val1,val2)
|
||||
{
|
||||
if (val1 == val2) { console.printLine("The strings ",val1," and ",val2," are equal") };
|
||||
if (val1 != val2) { console.printLine("The strings ",val1," and ",val2," are not equal") };
|
||||
if (val1 > val2) { console.printLine("The string ",val1," is lexically after than ",val2) };
|
||||
if (val1 < val2) { console.printLine("The string ",val1," is lexically before than ",val2) };
|
||||
if (val1 >= val2) { console.printLine("The string ",val1," is not lexically before than ",val2) };
|
||||
if (val1 <= val2) { console.printLine("The string ",val1," is not lexically after than ",val2) }
|
||||
if (val1 == val2) { Console.printLine("The strings ",val1," and ",val2," are equal") };
|
||||
if (val1 != val2) { Console.printLine("The strings ",val1," and ",val2," are not equal") };
|
||||
if (val1 > val2) { Console.printLine("The string ",val1," is lexically after than ",val2) };
|
||||
if (val1 < val2) { Console.printLine("The string ",val1," is lexically before than ",val2) };
|
||||
if (val1 >= val2) { Console.printLine("The string ",val1," is not lexically before than ",val2) };
|
||||
if (val1 <= val2) { Console.printLine("The string ",val1," is not lexically after than ",val2) }
|
||||
};
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
var s1 := "this";
|
||||
var s2 := "that";
|
||||
compareStrings(s1,s2);
|
||||
|
||||
console.readChar()
|
||||
Console.readChar()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
"a" -lt "b" # lower than
|
||||
"a" -eq "b" # equal
|
||||
"a" -gt "b" # greater than
|
||||
"a" -le "b" # lower than or equal
|
||||
"a" -ne "b" # not equal
|
||||
"a" -ge "b" # greater than or equal
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
"a" -eq "A"
|
||||
"a" -ceq "A"
|
||||
Loading…
Add table
Add a link
Reference in a new issue