File: test_logicalops.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (47 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# test_logicalops.kbs
# test program to check the logical operations
print "test integers"
print 1 = 1;
print 0 < 1;
print 1 > 0;
print 0 <= 1;
print 1 >= 0;
print 1 <= 1;
print 1 >= 1;
print 1 <> 0;
print
#
print "test integers and floats"
print 1 = 1.0;
print 0 < 1.1;
print 1 > 0.1;
print 0 <= 1.1;
print 1 >= 0.1;
print 1 <= 1.1;
print 1 >= .9;
print 1 <> 0.1;
print
#
print "test floats and integers"
print 1.0 = 1;
print 0.1 < 1;
print 1.1 > 0;
print 0.1 <= 1;
print 1.1 >= 0;
print 0.9 <= 1;
print 1.1 >= 1;
print 1.1 <> 0;
print
#
print "test strings"
print "apple" = "apple";
print "apple" < "applex";
print "applex" > "apple";
print "apple" <= "applex";
print "applex" >= "apple";
print "apple" <= "apple";
print "apple" >= "apple";
print "apple" <> "applex";
print
#