qse/ase/test/awk/comp.awk

49 lines
1.1 KiB
Awk

BEGIN {
OFS="\t\t";
print "1==1 :", (1 == 1);
print "1==0 :", (1 == 0);
print "1.0==1 :", (1.0 == 1);
print "1.1==1 :", (1.1 == 1);
print "1.0!=1 :", (1.0 != 1);
print "1.1!=1 :", (1.1 != 1);
print "abc" == "abc";
print "abc" != "abc";
print "--------------------------";
print "a == \"\" :", (a == "");
print "a >= \"\" :", (a >= "");
print "a <= \"\" :", (a <= "");
print "a > \"\" :", (a > "");
print "a < \"\" :", (a < "");
print "--------------------------";
print "a == \" \" :", (a == " ");
print "a >= \" \" :", (a >= " ");
print "a <= \" \" :", (a <= " ");
print "a > \" \" :", (a > " ");
print "a < \" \" :", (a < " ");
print "--------------------------";
print "\"\" == a :", ("" == a);
print "\"\" >= a:", ("" >= a);
print "\"\" <= a:", ("" <= a);
print "\"\" > a:", ("" > a);
print "\"\" < a:", ("" < a);
print "--------------------------";
print "\" \" == a :", (" " == a);
print "\" \" >= a:", (" " >= a);
print "\" \" <= a:", (" " <= a);
print "\" \" > a:", (" " > a);
print "\" \" < a:", (" " < a);
#a[10] = 2;
#print a == 1;
print (0.234 + 1.01123);
}