Closed drawkula closed 5 years ago
$ cat bad.b main() { auto i,m,x,y; m = 4; x = 0; y = 0; i = 0; while( i<m && x+y<=16384 ) { printf("%d*n",i); i++; } } $ /opt/ack/bin/ack -mlinux386 bad.b -o bad $ ./bad $ # no output
B seems not to have && like C. That's ok. But why does ack throw no error here?
&&
ack
I stumbled over this while chiselling a Mandelbrot set example in B for Rosetta Code.
Ooh, nice --- been a while since I saw some code quite so misleading... it parses like this:
while ((I<m) & ((&x+y) <= 16384))
Sadly I think that's WAI.
Thanks!
B seems not to have
&&
like C. That's ok. But why doesack
throw no error here?I stumbled over this while chiselling a Mandelbrot set example in B for Rosetta Code.