Mercurial > repos > tabletprog
annotate samples/hash.tp @ 376:d61b1f0e1936
Some minor WIP stuff in UI module
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 15 Aug 2015 22:45:24 -0700 |
parents | 2a0463c46913 |
children |
rev | line source |
---|---|
79
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #{ |
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 main <- { |
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 print: "hash of 'foo' is " . ("foo" hash) . "\n" |
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 print: "hash of 'bar' is " . ("bar" hash) . "\n" |
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 print: "hash of 'foobar' is " . ("foobar" hash) . "\n" |
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 print: "hash of 1 is " . (1 hash) . "\n" |
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 print: "hash of 2 is " . (2 hash) . "\n" |
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 print: "hash of 3 is " . (3 hash) . "\n" |
336
2a0463c46913
Add hash method to float types and make hash always return a 32-bit int
Michael Pavone <pavone@retrodev.com>
parents:
79
diff
changeset
|
9 print: "hash of 1u32 is " . (1u32 hash) . "\n" |
2a0463c46913
Add hash method to float types and make hash always return a 32-bit int
Michael Pavone <pavone@retrodev.com>
parents:
79
diff
changeset
|
10 print: "hash of 2.0 is " . (2.0 hash) . "\n" |
2a0463c46913
Add hash method to float types and make hash always return a 32-bit int
Michael Pavone <pavone@retrodev.com>
parents:
79
diff
changeset
|
11 print: "hash of 3f32 is " . (3.0f32 hash) . "\n" |
79
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 } |
7f635666c73d
Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 } |