Basic Dignified Functions

Por farique

Resident (39)

Imagen del farique

16-01-2020, 18:03

Meanwhile at the slow (pun intended) Basic lane...
I've just implemented a rudimentary function system in MSX Basic Dignified. As there are no global variables in MSX Basic its use is limited but I found it helpful in some cases. Also added ++, +=,... operators.

Here is a largely unnecessary example image (I think it is pretty, tho Tongue )

Cheers

Login sesión o register para postear comentarios

Por Parn

Paladin (837)

Imagen del Parn

16-01-2020, 20:01

Very interesting! I have a couple of suggestions, would you like to discuss them here or do you prefer me to contact you in some other way?

Por farique

Resident (39)

Imagen del farique

17-01-2020, 20:17

Sent you an email.

Por Parn

Paladin (837)

Imagen del Parn

17-01-2020, 23:34

Thanks! I'll reply as soon as I can Smile

Por farique

Resident (39)

Imagen del farique

06-03-2020, 01:15

Bumping this thing just to say that MSX Basic Dignified is now ported to Python 3. Someone (rightfully) asked for it but I could not find who or where the asking was done.

Of course several features crept in during the process; as a matter of fact all of the "Badig Suit" :P was ported to Python 3.
If you happen to use Basic Dignified and has Sublime Text 3, a look at the MSX Sublime Tools couldn't hurt, it is very well behaved lately.

Por Dolphin101546015

Champion (336)

Imagen del Dolphin101546015

06-03-2020, 13:15

farique wrote:

Actualy I don't understand whats is for needed?
You want create MSX Basic with new syntax?
Ok, then why you using "then", for example, instead С lang syntax?
Or this notation:
[?@]1,1 chr$(ch);ch
It just unreadable!
Also where even simplest optimisations?
For example:
if ny>=22 then ny=22
Will be converted to:
if ny>21 then ny=22
Double checking for Basic, it speed degradation forever.
Also 4 conditions with calling same function, after it.

So, why don't using C syntax for it?
1. It have more concise syntax
2. It more better readable
3. It more functional
4. It might be compiled to Asm also, and simplest for optimizations.

Por farique

Resident (39)

Imagen del farique

06-03-2020, 18:46

Well, I think the C community already have a lot of tools available to them, not so with the Basic people.
Actually it is just a fun study on making the best modern MSX Basic (it's being ported to the CoCo now =D ) development environment I can manage. I don't want a new syntax (a new dialect, maybe); I want an improved MSX Basic syntax.
The readme acknowledges all the other efforts (Tabmegx, Inliner, etc) and explains why I wanted something a little different.

Do not mind for this example, it does nothing, really, it is just a collection of unoptimised constructs to show most of the features possible in the least space.

"It just unreadable!"
It means "print at" enclosed on the pre-existing DEFINE construct (the readme tells it all), you can still use LOCATEx,y:PRINT. (you can even create your own with DEFINEs)

"Ok, then why you using "then", for example, instead С lang syntax?"
That is a very good idea. I want to preserve the Basic syntax (with improvements, of course) because that is the target audience but as with "func" and the new "loop labels" it does not hurt to have alternate ways to write the code.

"if ny>21 then ny=22"
This is also a good idea for the upcoming feature of producing the best, smallest, fastest, Basic code possible out of the Dignified version. Actually, actually, I wold love to hear about Basic optimisations to use on this new feature.

Por Dolphin101546015

Champion (336)

Imagen del Dolphin101546015

07-03-2020, 00:49

Thank you for such a detailed answer, it clarified a lot.
Smile