SmallBasic on Mac OSX

SmallBASIC implementations: 

I have been running SmallBasic on Linux (Ubuntu 16.04LTS) and also a Raspberry Pi and an Odroid C2 for a while now. However, I have always wanted to get it running on my Apple Mac. Having had some spare time recently I had a go and the following outlines the sequence I used to achieve this.

Setup and required packages for MacOSX (Sierra 10.12.5).

I already had the Xcode command line tools (which includes git, gcc and g++) and brew (package manager) installed on my system. However, it is fairly straight forward to set this up.

Issues with FORM()

SmallBASIC implementations: 

1. 'text' attribute does not return any value (there is no way to access its value).
(BTW, the backSpace key behaves as Delete key when in the leftmost position of the field. It's not standard and unexpected).

2. It's better to have some way to create a background color for the whole form, to support background color for 'label', 'link', etc.
Maybe by the backgroundColor property of the form object itself; or by supporting backgroundColor property for 'label' and 'link' - *without* frame-line; or by adding another background attribute; or any other way.

Speed of array vs. string (using MID and REPLACE)

SmallBASIC implementations: 

(I'm using 32-bit Linux Mint 17.3 and SB 0.12.2)

A lot can be done with strings, since it is Also an array of bytes (excluding the NULL character which C dislikes), but for creating efficient code, both MID and REPLACE functions must work in a reasonable speed (or am I missing something?).

Is there any chance to make MID and REPLACE work faster, OR, adding an efficient new string routines, GETMID and PUTMID, which using ASCII value instead of string-character, and work as fast as an array? for example:

[NEW FEATURE] Xstep, Ystep

SmallBASIC implementations: 

For extending the GRAPHICS abilities, such as drawing Thick lines, arcs, etc, we need to know the current x,y position of STEP, for example:

PSET [STEP] x,y [, color| COLOR color]

[STEP x,y] are internal variables, so we want to have access to them as a new system variables (the same way as we can access XMAX and YMAX):

Then we can create thick line, for example, like this:

' LINE syntax: LINE [STEP] x,y [,|STEP x2,y2] [, color| COLOR color]


Subscribe to RSS - Linux