Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Also some of that older stuff it can be the compiler only let you have 8 chars for a variable name.


Applesoft BASIC only uses the first two characters (!) to distinguish one variable name from another. WAGON and WATER would be the same.

(page 7)

https://mirrors.apple2.org.za/Apple%20II%20Documentation%20P...


This is generally true of most 6502 Microsoft BASIC derivatives, Apple and Commodore included.


That was true of most BASIC dialects of that era. Many hard to track down bugs were introduced when programmers didn't understand this and had WATER overwrite WAGON.


Amstrad CPC's Locomotive BASIC supported up to 40 character variable names with no trimming.


Pretty sure the c64 did the same thing...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: