Structured BASIC dialects have function-local variables, BASIC dialects that support linking separately compiled modules support exported and non-exported variables, etc.
Structured BASIC was already the way in CP/M, Vax,MS-DOS, Amiga, and even Dartmouth BASIC evolved to support structured programming.
DEC BASIC on VMS even had somewhat common-lisp comparable condition facility thanks to OS support, for those who don't know that means non-unwinding exceptions that allow continuing from where the condition was signaled
That's original Basic. Recreations are more complete.
BBC BASIC's first release in 1981 had LOCAL in DEF PROC and DEF FN.
And I've upvoted and favorited, because this is the most out of date comment I've read on hn so far. ;)