6

This code returns -1 for R3 and +1 for R2. I'd like to know what I am doing wrong.

 f: func [] [
     also  return  1
           return -1
 ]
 f
earl
  • 40,327
  • 6
  • 58
  • 59
Jina.
  • 105
  • 6

2 Answers2

2

That is already listed as a bug in R3. The correction is on the way, AFAIK.

Ladislav
  • 970
  • 4
  • 15
2

You are doing nothing wrong; unfortunately you are tripped up by a known bug in R3. Basically, the also incorrectly "eats up" the return. Fortunately, we have a fix for this forthcoming. (If you want to help with testing, have a look at my fix-unwind-passing branch.) I hope we'll have this fix done and integrated shortly.

earl
  • 40,327
  • 6
  • 58
  • 59