comparison samples/rand.tp @ 162:157cc497a7f1

Add rand srand and time to os module
author Mike Pavone <pavone@retrodev.com>
date Sat, 10 Aug 2013 18:58:40 -0700
parents
children
comparison
equal deleted inserted replaced
161:fc8eecad71e6 162:157cc497a7f1
1 #{
2 main <- :args {
3 os srand: (os time)
4 count <- 1
5 if: (args length) > 1 {
6 count <- int32: (args get: 1)
7 }
8 while: { count > 0 } do: {
9 print: (hex: (os rand64)) . "\n"
10 count <- count - 1
11 }
12 }
13 }