WwwBasic – An implementation of BASIC designed to be easy to run on the Web
New versions of BASIC are surprisingly common (heck, I even have one that's gotten some super-nice comments).<p>Mind-blowing BASIC example from the 1970's:<p><pre><code>    100 A$="ABCDEF"
    110 A$ = REP ("123", 4, 0)
    120 PRINT A$
</code></pre>
The result is ABC123DEF -- at position 4 (strings start at 1), replace 0 characters with "123". So the REP function looks at the statement it's part of, finds the variable that is being assigned to, and uses that as the starting string (!). It's kind of like a function, only with a weird implied variable that only works in an assignment.<p>You can't just PRINT the result directly, because then how would REP know what the string to change is?<p>Nowadays "weird" syntax has some solid foundational reason why it's useful or important. This not-really-a-function, though, simply has no justification whatsoever.<p>(This example is from the BASIC embedded in the Tektronix 4050 terminal).<p>There are enough variants of BASIC that there's a really nifty handbook with the differences at <a href="https://archive.org/details/Basic_Handbook_2nd_Edition_1981_CompuSoft_Publishing" rel="nofollow">https://archive.org/details/Basic_Handbook_2nd_Edition_1981_...</a>