V Forum

[ log in ]

error no run

xiaojin20 May 20 08:41
port time
2 fn main(){
3 mut a:=0
4 mut b:=0
5 mut c:=0
6 tm:=time. ticks()
7 for i in 0..1000000{
8 c+=a[i]*b[i]}
9 println((time.ticks()-tm))
10 }
11
xiaojin20 May 20 08:42
Thank you
xiaojin20 May 20 11:25
Also theme obsolete
Ivo-Balbaert Jun 17 08:35
a and b are not arrays, they are ints
That's why you cannot subscript them as a[i]

The current error is a C error, the error should perhaps better be caught in V.
medvednikov Jun 17 21:52
Yeah it's a compiler bug.



Powered by Vorum, open-source blogging/forum software written in V