SymbOS MSX multitasking operating system - help needed!

Page 328/397
321 | 322 | 323 | 324 | 325 | 326 | 327 | | 329 | 330 | 331 | 332 | 333

By Trebmint2

Master (242)

Trebmint2's picture

09-06-2014, 15:52

Hey, I've decided to make some changes over last few days. Symstudio & SymBasic are now dead. The new name will be The Unify Editor & Unify. The reason to change is that I want to take Unify(ex symbasic) away from a purely a basic language and include other c, c# type syntax which can be freely mixed. I hope this might make the language easier to get to grips with from whatever development language you're used too, and increase the number of people who look at it.

Secondly symbasic has always lacked Classes, which were previously kind of represented via the use of form objects, and just labelling variables button1_x, button1_y etc. I really wanted to develop a true OO compiler so therefore I've started to implement Class, which had to be done while I was implementing the new compiler code. I would be interested in peoples opinion of the following syntax/style of code before I get too deep to change it.

Basic Style version

Class Button
	Field x:Int = 0
	Field y:Int = 0
	Field w: Int = 50
	Field h: Int = 20
	Method Move(offsetx:Int,offsety:Int)
		Var totalx:Int = x + offsetx 		//Yes could not use these and just have x=x+offsetx
		Var totaly:Int = y + offsety		//But I wanted to show a Var definition
		x = totalx
		y = totaly
	End Method
End Class

C/C# Style version

Class Button
{
	Field x:Int = 0;
	Field y:Int = 0;
	Field w: Int = 50;
	Field h: Int = 20;
	Method Position(mx:Int, my:Int, mw:Int, mh:Int)
	{
		x = mx;
		y = my;
		w = mw;
		h = mh;
	}
	Method Move(Moveoffsetx:Int,offsety:Int)
	{
		Var totalx:Int = x + offsetx; 	
		Var totaly:Int = y + offsety;	
		x = totalx;
		y = totaly;		
	}
}

Meaning we could then do things like

Var SayOk:Button;
SayOk.Position(10,100,50,20);
While (SayOk.X < 100)
{
	SayOk.Move(5,0);
}

By Prodatron

Paragon (1804)

Prodatron's picture

09-06-2014, 16:41

TBH I love this C style!
I just hope, that mixing basic style and C style won't confuse the compiler in some situations?
Wouldn't OO structures slow the usage of functions?

By Prodatron

Paragon (1804)

Prodatron's picture

09-06-2014, 16:52

Trebmint designed two variations of a new system (standard) font, which is probably more readable, thanks a lot for this!
Now I wonder which one to use.
This is the current system font:

This is the new one with a little squiggle:

This is the new one without squiggle:

(sorry for using CPC screenshots, but it will be the same for the MSX of course)
The big questions: Which font do you prefer??

By edoz

Prophet (2422)

edoz's picture

09-06-2014, 16:55

I love the second picture Big smile

By edoz

Prophet (2422)

edoz's picture

09-06-2014, 16:59

BDW: "The Unify Editor & Unify" Have to adapt to that name Wink .. I like the c# style also. BDW: c# and VB are also almost the same Wink

By Trebmint2

Master (242)

Trebmint2's picture

09-06-2014, 17:32

Yes TBH using Methods will be a little slower, but has readability, size and other benefits. Plus you don't have to use it, but it will be nice to have a truely OO language.

By Grauw

Ascended (10319)

Grauw's picture

09-06-2014, 21:38

I like the third font (nonsquiggly) best.

By flashjazzcat

Supporter (9)

flashjazzcat's picture

09-06-2014, 22:31

Third font looks most appealing to me. Smile

I must say there are so many exciting things going on with SymbOS at the moment! The new IDE looks terrific. Unfortunately I'm still working on the Atari counterpart's kernel. Big smile

By Prodatron

Paragon (1804)

Prodatron's picture

09-06-2014, 23:32

Currently we have a head start regarding the new system font:
- Grauw, FJC and Trebmint for #3
- Edoz and Prodatron for #2
Let's see how it ends Tongue Thanks a lot for your Atari8 opinion, Jon!

By karloch

Prophet (2156)

karloch's picture

10-06-2014, 00:08

Third one

Page 328/397
321 | 322 | 323 | 324 | 325 | 326 | 327 | | 329 | 330 | 331 | 332 | 333