The BASIC version that run BBC Micro had proper functions and subroutines with local variables (I think it even had recursion, but I'm not 100% sure).
AFAIK, all Microsoft BASIC (of which AppleSoft BASIC was a descendent) versions did not have the above until QBasic.