2 ms·
Newer BASICs were, too. In fact, the statement you wrote above was still valid in Visual Basic 6.0, provided that it was inside a method in a form (window) - in
by int_19h 9y ago
Newer BASICs were, too. In fact, the statement you wrote above was still valid in Visual Basic 6.0, provided that it was inside a method in a form (window) - in which case it drew the line on that window. If you wanted to draw it on another one, then you had to use the dot-syntax, but the rest of it would be the same, e.g.:
otherForm.LINE (x1, y1) - (x2, y2), 2, BF
Curiously, LINE was an actual method, with regular parameters; it's just that it had this irregular syntax when calling it. VB had a bunch of special-cased rules for some identifiers like that, for back-compat reasons. Pretty much anything you could do in QB, you could do in VB - CIRCLE, PSET etc.
https://msdn.microsoft.com/en-us/library/aa230480(v=vs.60).aspx https://msdn.microsoft.com/en-us/library/aa230480(v=vs.60).a...
This all got ditched in VB.NET in favor of a regular syntax.
But my favorite part in old BASICs was that the function MID$() - which in other languages is usually known as "substring" or "substr" - was special-cased so that it could be used as target of assignment. So:
s$ = "foobar"
PRINT MID$(s$, 2, 3) ' oba
MID$(s$, 1, 2) = "uu"
PRINT s$ ' fuubar
And yes, VB has this, too. In fact, even VB.NET does (although it did away with $).