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]

[IDEA] Syntax Coloring code for SmallBASIC IDE

SmallBASIC implementations: 
I see lots of wrong Syntax Coloring in SmallBASIC IDE.
The following code translated from Euphoria 3.1.1 into SmallBASIC (I've extended the character classes and used it in my own IDE for DOS, and it works just great).

Maybe you (Chris) want to use this logic.

1. keywords.bas (included in syncolor.bas):

REM created: 29/04/2016


Subscribe to RSS - Linux