Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
function bug ???
Hi everyone

Found another possible bug in Naalaa 6 (windows version). Why these things always happen to me ? [Image: bug.png][Image: wink.png]
I was testing a simple function then i thought let's make a crazy thing... and program worked without any errors. Say what ?[Image: smile.png]


set color 0,0,0

set color 255,255,255
wln a,"+",b,"=",c

wln "press space to exit"
wait keydown

function addnum(a,b)
  return c
  'what is this ? no error ? endproc in function ?
In NaaLaa the diference between a function and a procedure is that the latest doesn't return a value,
so my interpretetion is:

No matter if is a endproc or endfunc what metters in this case is the end of both and it must be a valid
endfunc or endproc, if you write just end or end what ever it will freeze you machine, just test in linux and frooze it.

Maybe it needs a better endfunc endproc error checking ending and endif also but this stuff is allways
easier to say then done....
I'll fix this issue and the endif one. It's code I wrote ten years ago when playing around, and I guess I didn't test it for errors that much.

Forum Jump:

Users browsing this thread: 1 Guest(s)