mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
V 0.0.12 open-source release
This commit is contained in:
14
rand/rand.v
Normal file
14
rand/rand.v
Normal file
@@ -0,0 +1,14 @@
|
||||
module rand
|
||||
|
||||
#include <time.h>
|
||||
// #include <stdlib.h>
|
||||
fn seed() {
|
||||
# time_t t;
|
||||
# srand((unsigned) time(&t));
|
||||
}
|
||||
|
||||
fn next(max int) int {
|
||||
# return rand() % max;
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user