1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

check integer const overflow at compilation

This commit is contained in:
Alexander Medvednikov
2019-07-10 16:05:39 +02:00
parent 69d2db0f1e
commit 3d4cd0bbc0
4 changed files with 45 additions and 2 deletions

View File

@ -133,6 +133,10 @@ pub fn (s string) int() int {
return C.atoi(s.str)
}
pub fn (s string) i64() i64 {
return C.atoll(s.str)
}
pub fn (s string) f32() f32 {
return C.atof(s.str)
}