I don't like lines extended over to China horizontally because of use of colons but do like these little ditties, with single statements per line. Neither do I like too many single letter variables unless they are obvious like x, y, mx, my, s$ for temp string of text$. I like nice readable short code.
I have an idea for a game library to make writing 10 liners, more or less, easier.
Why waste code on the usual sh... stuff?
For instance the game library could have:
PlayGameCodeHere ' read and execute your 10 liner here
_Limit Lim
' let coder set Lim
Actually that would be the main code and then $Include the 10 liner game.
@bplus You have a lot of tricks up your sleeve, but I'll bet DIMming k$ as "LONG" is not one of them. :D
I completely agree about the line challenge and non-use of colons. Every colon is another line, in my opinion. Oh course, characters could be counted, but that's not entirely fair either, as certain keywords are longer than others.
I use the same approach to most of my larger programs. Make a central hub, and run sub-routines from it. This method allowed me to always know the program flow would continuously be cycled through that hub. Back in the old days, it provided a way to time the program, and evoke a screen saver. Other advantages existed, too.
@Dav Speaking of screen savers, in the paragraph above, I would have loved to have the plasma one you posted! Very cool!
@Kiara87 I get it, more of a discussion concerning optimization of BASIC code, rather than the use of BASIC libraries to develop OOP. Most of what I see of a practical aspect of this is the use of creative algorithms, mostly math formulas, like Dav and Bill posted in their 10-liners. The downside of "optimization" when it comes to limiting lines of code, ironically, results in obfuscation, much the same too many lines of convoluted code produce. Use of GOTO statements, for example, to cut down on a loop line code. I consider that bad coding practice, especially to introduce it, in a positive way, to a beginner. I consider BASIC best for coders who like to build things from the foundation up. All I ever heard from C communities is "You need a library for that." That was their response to me trying to write a keyboard function in C. I eventually accomplished it, because it was possible with C/C++ statements, but I was not too happy that such a large community completely lost track of how to build a program from the foundation up.
Pete
PS
@Dimster That was just a typo on Mark's part. He was just giving a skeleton, almost pseudo-code, example of how to set up a 10-line hub to run a program. Sorry for the late reply, you posted while I was writing.