There are a couple of problems with Javo's example. First, it tests BT before setting it. Secondly, more than one button can be pressed, which would cause the test to fail since BT would not equal #A.
The reason why my example tests for button release first is because I was running the program with the RUN command in direct mode (pressing "A" to enter the command) and the "A" button was still pressed when the program started (because SmileBASIC is so fast).
I had my own program in slot 0 and the button testing program above in slot 1. As far as I know, the START button always runs the program in slot 0. So I was using the command RUN 1 in direct mode to start the button testing program. Sorry to complicate things with all that detail! 8D