File: randcheck.wl

package info (click to toggle)
wadc 3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 7,352 kB
  • sloc: java: 3,808; ansic: 1,950; xml: 135; makefile: 67; sh: 34
file content (15 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#"standard.h"


randprint {  print(1|2|3|4|5|6|7|8|9|0) }
main {
  randprint    -- this should be different on re-runs

  print(rand(0,2))  -- this should print one of {0,1,2}
  print(rand(-2,2)) -- this should print one of {-2,-1,0,1,2}

  seed (1337)
  randprint    -- this should always be the same
  seed (5)
  randprint    -- this should always be the same
}