LoginLogin
Might make SBS readonly: thread

SmileBASIC Simplification Protocol Example replacement

Root / Talk About Programs / [.]

chemicalexCreated:
So the main point of SBSP is to make smileBASIC simpler to write. I'm going to give some example code and what it sets to, so give feedback for what you think positively and negatively. SBSP:
FOR I=0,100 DO
PRINT I
NEXT
SmileBASIC:
FOR I=0 TO 100
PRINT I
NEXT
SBSP:
QUERY"What is your name?";ANS$
SmileBASIC:
LINPUT"What is your name?";ANS$
SBSP:
LOCAL VAR=10.5
SmileBASIC:
LOC_VAR=10.5
SBSP:
GETDATFROM FINDDATA

READ A$
PRINT A$

@FINDDATA
DAT"Hello World!"
SmileBASIC:
RESTORE @FINDDATA
READ A$
PRINT A$

@FINDDATA
DATA "Hello World!"

The LOCAL example seems broken, at least if the intention is to have it behave the same as the 'local' keyword in any other language. The 'parameter' to GETDATAFROM does not look like a label (no @) - it's best not to introduce inconsistency. Also, RESTORE can take a string value, GETDATAFROM looks like it will be less useful because it can't.

The LOCAL example seems broken, at least if the intention is to have it behave the same as the 'local' keyword in any other language. The 'parameter' to GETDATAFROM does not look like a label (no @) - it's best not to introduce inconsistency. Also, RESTORE can take a string value, GETDATAFROM looks like it will be less useful because it can't.
The name GETDATFROM it supposed to GET DATA FROM a loop. Also it converts things like GETDATFROM @LOOP and changes it to the version explained above, and converts it BACK so either way would be fine. But thanks for your criticism!

GETDATFROM seems pointless, since RESTORE is obsolete (because of COPY). Perhaps you could do: GETDATAFROM <@label>,<array> which converts to COPY <array>,<@label>

RESTORE is obsolete (because of COPY).
I used RESTORE about 4 times in the N# compiler ;-;

RESTORE is obsolete (because of COPY).
I used RESTORE about 4 times in the N# compiler ;-;
I use restore A LOT. If copy can't handle 2 dimensional arrays, then I won't use it, but I don't really know. On SBSP: Looks cool, will there be it's own custom commands too or just 'simplified' stuff?

RESTORE is obsolete (because of COPY).
I used RESTORE about 4 times in the N# compiler ;-;
I use restore A LOT. If copy can't handle 2 dimensional arrays, then I won't use it, but I don't really know. On SBSP: Looks cool, will there be it's own custom commands too or just 'simplified' stuff?
Trying to figure out the for each loop end, lol

How about GETDATAFROM @label, array, width

I find the idea original, but it's not very practical, I mean.. it's like saying "I'll make english easier: D wana go wit me, @ice-cream?" xd