Thanks for your bug report. This is intentional. Ideally, $bvar(&nonexist,0) should also return an error. That would be my preference. However, at the time this was implemented, scripters appeared to be happy with the behaviour, and now that it has been in place for so long, changing it would break existing scripts.