| 1 | REBOL [] |
|---|
| 2 | |
|---|
| 3 | ; numbers with tuples |
|---|
| 4 | a: 1.2.3 |
|---|
| 5 | b: 253 |
|---|
| 6 | print ["RT11: add tuple pos-integer" a + b b + a] |
|---|
| 7 | print ["RT12: sub tuple pos-integer" a - b] |
|---|
| 8 | print ["RT13: mul tuple pos-integer" a * b b * a] |
|---|
| 9 | print ["RT14: div tuple pos-integer" a / b] |
|---|
| 10 | print ["RT15: and tuple pos-integer" a and b] |
|---|
| 11 | print ["RT16: or tuple pos-integer" a or b] |
|---|
| 12 | print ["RT17: xor tuple pos-integer" a xor b] |
|---|
| 13 | |
|---|
| 14 | b: -253 |
|---|
| 15 | print ["RT21: add tuple neg-integer" a + b b + a] |
|---|
| 16 | print ["RT22: sub tuple neg-integer" a - b] |
|---|
| 17 | print ["RT23: mul tuple neg-integer" a * b b * a] |
|---|
| 18 | print ["RT24: div tuple neg-integer" a / b] |
|---|
| 19 | print ["RT25: and tuple neg-integer" a and b] |
|---|
| 20 | print ["RT26: or tuple neg-integer" a or b] |
|---|
| 21 | print ["RT27: xor tuple neg-integer" a xor b] |
|---|
| 22 | |
|---|
| 23 | b: 501.12345 |
|---|
| 24 | print ["RT31: add tuple pos_decimal" a + b] |
|---|
| 25 | print ["RT32: sub tuple pos_decimal" a - b] |
|---|
| 26 | print ["RT33: mul tuple pos_decimal" a * b] |
|---|
| 27 | print ["RT34: div tuple pos_decimal" a / b] |
|---|
| 28 | print ["RT35: and tuple pos_decimal" a and b] |
|---|
| 29 | print ["RT36: or tuple pos_decimal" a or b] |
|---|
| 30 | print ["RT37: xor tuple pos_decimal" a xor b] |
|---|
| 31 | |
|---|
| 32 | b: -501.12345 |
|---|
| 33 | print ["RT41: add tuple neg_decimal" a + b] |
|---|
| 34 | print ["RT42: sub tuple neg_decimal" a - b] |
|---|
| 35 | print ["RT43: mul tuple neg_decimal" a * b] |
|---|
| 36 | print ["RT44: div tuple neg_decimal" a / b] |
|---|
| 37 | print ["RT45: and tuple neg_decimal" a and b] |
|---|
| 38 | print ["RT46: or tuple neg_decimal" a or b] |
|---|
| 39 | print ["RT47: xor tuple neg_decimal" a xor b] |
|---|
| 40 | |
|---|
| 41 | ; tuples with tuples |
|---|
| 42 | b: 0.0.0 |
|---|
| 43 | print ["low bound"] |
|---|
| 44 | print ["RT51: add tuple tuple" a + b b + a] |
|---|
| 45 | print ["RT52: sub tuple tuple" a - b b - a] |
|---|
| 46 | print ["RT53: mul tuple tuple" a * b b * a] |
|---|
| 47 | print ["RT54: div tuple tuple" b / a] ;; div by zero |
|---|
| 48 | print ["RT55: and tuple tuple" a and b b and a] |
|---|
| 49 | print ["RT56: or tuple tuple" a or b b or a] |
|---|
| 50 | print ["RT57: xor tuple tuple" a xor b b xor a] |
|---|
| 51 | |
|---|
| 52 | b: 255.255.255 |
|---|
| 53 | print ["high bound"] |
|---|
| 54 | print ["RT61: add tuple tuple" a + b b + a] |
|---|
| 55 | print ["RT62: sub tuple tuple" a - b b - a] |
|---|
| 56 | print ["RT63: mul tuple tuple" a * b b * a] |
|---|
| 57 | print ["RT64: div tuple tuple" a / b b / a] |
|---|
| 58 | print ["RT65: and tuple tuple" a and b b and a] |
|---|
| 59 | print ["RT66: or tuple tuple" a or b b or a] |
|---|
| 60 | print ["RT67: xor tuple tuple" a xor b b xor a] |
|---|
| 61 | |
|---|
| 62 | b: 127.127.127 |
|---|
| 63 | print ["between"] |
|---|
| 64 | print ["RT71: add tuple tuple" a + b b + a] |
|---|
| 65 | print ["RT72: sub tuple tuple" a - b b - a] |
|---|
| 66 | print ["RT73: mul tuple tuple" a * b b * a] |
|---|
| 67 | print ["RT74: div tuple tuple" a / b b / a] |
|---|
| 68 | print ["RT75: and tuple tuple" a and b b and a] |
|---|
| 69 | print ["RT76: or tuple tuple" a or b b or a] |
|---|
| 70 | print ["RT77: xor tuple tuple" a xor b b xor a] |
|---|
| 71 | |
|---|
| 72 | b: 127.127.127.127 |
|---|
| 73 | print ["different len"] |
|---|
| 74 | print ["RT81: add tuple tuple" a + b b + a] |
|---|
| 75 | print ["RT82: sub tuple tuple" a - b b - a] |
|---|
| 76 | print ["RT83: mul tuple tuple" a * b b * a] |
|---|
| 77 | print ["RT84: div tuple tuple" a / b] ;; div by zero |
|---|
| 78 | print ["RT85: and tuple tuple" a and b b and a] |
|---|
| 79 | print ["RT86: or tuple tuple" a or b b or a] |
|---|
| 80 | print ["RT87: xor tuple tuple" a xor b b xor a] |
|---|
| 81 | |
|---|