Mercurial > repos > rhope
annotate teststring.rhope @ 138:1411de6050e1
First stab at transaction data structures, needs work
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 16 Nov 2010 21:53:18 -0500 |
parents | 4d5ea487f810 |
children |
rev | line source |
---|---|
78
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 Main[] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 { |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 barbaz <- [right]Append["baz"] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 ,right <- ["foobar"]Slice[3] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 { Print[~] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 { Print[right] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 { Print[barbaz] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 { |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 bar,baz <- [barbaz]Slice[3] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 { Print[bar] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 { Print[baz] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 { |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 If[[bar]=[ [["b"]Append["a"]]Append["r"] ]] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 { |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 Print["Comparison OK"] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
17 { |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 ,delim,after <-["foshizzlemynizzle"]Partition["my"] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 { Print[~] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
20 { Print[delim] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
21 { Print[after] }}} |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
22 |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
23 } |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
24 }{ |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
25 Print["Comparison failed"] |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
26 } |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
27 }}} |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
28 }}}} |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
29 } |
4d5ea487f810
Working String implementation and some basic (but nowhere near exhaustive) tests
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
30 |