DO … UNTIL loops will be implemented:
DO
...
UNTIL K < 10
Command BREAK interrupts loop:
DO
...
IF K = 5 THEN BREAK
...
UNTIL K < 10
2.4 version
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.4 version
DRAW PIXEL and GET PIXEL COLOR will be optimized for speed.
Also bug with these commands will be corrected.
(Note: current workaround is to use integer X and Y coordinates.)
Also bug with these commands will be corrected.
(Note: current workaround is to use integer X and Y coordinates.)
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.4 version
Command RESTORE will be expanded:
RESTORE TO label
resets data counter for reading values from command DATA which goes in code after label [label].
RESTORE TO label
resets data counter for reading values from command DATA which goes in code after label [label].
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.4 version
New command will be implemented:
DRAW POLY x,y COUNT n START s
draws polygon with arbitrary number of vertices. Variables [x] and [y] are single-dimensional numeric arrays with "x" and "y" coordinates of vertices, [n] is number of vertices to draw and [s] is index of first vertex. If parameter COUNT is omitted then maximum number of vertices is used. If parameter START is omitted then vertices start from first index in arrays. For example:
DRAW POLY x,y
draws polygon using all vertices in [x] and [y] arrays.
Command OPTION BASE has its effect in this command.
DRAW POLY x,y COUNT n START s
draws polygon with arbitrary number of vertices. Variables [x] and [y] are single-dimensional numeric arrays with "x" and "y" coordinates of vertices, [n] is number of vertices to draw and [s] is index of first vertex. If parameter COUNT is omitted then maximum number of vertices is used. If parameter START is omitted then vertices start from first index in arrays. For example:
DRAW POLY x,y
draws polygon using all vertices in [x] and [y] arrays.
Command OPTION BASE has its effect in this command.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.4 version
New command will be implemented:
FILL POLY x,y COUNT n START s
fills polygon with arbitrary number of vertices. Variables [x] and [y] are single-dimensional numeric arrays with "x" and "y" coordinates of vertices, [n] is number of vertices to draw and [s] is index of first vertex. If parameter COUNT is omitted then maximum number of vertices is used. If parameter START is omitted then vertices start from first index in arrays. For example:
FILL POLY x,y
fills polygon using all vertices in [x] and [y] arrays.
Command OPTION BASE has its effect in this command.
FILL POLY x,y COUNT n START s
fills polygon with arbitrary number of vertices. Variables [x] and [y] are single-dimensional numeric arrays with "x" and "y" coordinates of vertices, [n] is number of vertices to draw and [s] is index of first vertex. If parameter COUNT is omitted then maximum number of vertices is used. If parameter START is omitted then vertices start from first index in arrays. For example:
FILL POLY x,y
fills polygon using all vertices in [x] and [y] arrays.
Command OPTION BASE has its effect in this command.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.4 version
DEBUG option will be removed from OPTION command to become separate DEBUG commands:
DEBUG OFF
DEBUG ON
turn off/on debugging mode. When debugging mode is on, extra button (with magnifying glass) appears in top left corner of the screen when program is running. Pressing this button pauses program execution and displays debug screen with contents of all variables at this moment. When debugging mode is on, this debug screen automatically appears if your program crashes.
DEBUG PAUSE
pauses program execution and displays debug screen with contents of all variables at this moment. It is not necessary to turn on debugging mode (DEBUG ON) to use this command.
DEBUG OFF
DEBUG ON
turn off/on debugging mode. When debugging mode is on, extra button (with magnifying glass) appears in top left corner of the screen when program is running. Pressing this button pauses program execution and displays debug screen with contents of all variables at this moment. When debugging mode is on, this debug screen automatically appears if your program crashes.
DEBUG PAUSE
pauses program execution and displays debug screen with contents of all variables at this moment. It is not necessary to turn on debugging mode (DEBUG ON) to use this command.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.4 version
New file management function will be implemented:
You can duplicate program by copying the file and pasting it to the same folder. When duplicated, new file is created by adding word "copy" to file name. If file with duplicated name already existed then it is deleted and replaced with fresh copy of file.
For example, if you duplicate file "program.txt" then its copy with name "program copy.txt" will be created. If file "program copy.txt" already existed then it will be replaced with fresh copy.
You can duplicate program by copying the file and pasting it to the same folder. When duplicated, new file is created by adding word "copy" to file name. If file with duplicated name already existed then it is deleted and replaced with fresh copy of file.
For example, if you duplicate file "program.txt" then its copy with name "program copy.txt" will be created. If file "program copy.txt" already existed then it will be replaced with fresh copy.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.4 version
New general feature will be implemented:
You can insert contents of another program file in your program by using "{}" brackets. For example, code:
{library.txt}
will insert text from file "library.txt" at this place in your program. You can omit ".txt" and write it like this:
{library}
smart BASIC will understand that you want to insert contents of file "library.txt" here.
This is a pre-processing feature, so at first smart BASIC combines all files into one code and only then executes it.
In the case of error, smart BASIC loads that file which contained the error.
New general command will be implemented:
RUN n$
runs program with name [n$]. It is the same as ending your current program, loading file with name [n$] and running it. You can omit ".txt" extension in file name.
New math functions will be implemented:
CEIL (x)
returns ceiling value for [x].
FLOOR (x)
returns floor value for [x].
AND (x, y)
returns bitwise AND of [x] and [y].
OR (x, y)
returns bitwise OR of [x] and [y].
XOR (x, y)
returns bitwise XOR of [x] and [y].
BIT (x, n)
returns [n]-th bit of [x]. Bit numbers start from 0.
You can insert contents of another program file in your program by using "{}" brackets. For example, code:
{library.txt}
will insert text from file "library.txt" at this place in your program. You can omit ".txt" and write it like this:
{library}
smart BASIC will understand that you want to insert contents of file "library.txt" here.
This is a pre-processing feature, so at first smart BASIC combines all files into one code and only then executes it.
In the case of error, smart BASIC loads that file which contained the error.
New general command will be implemented:
RUN n$
runs program with name [n$]. It is the same as ending your current program, loading file with name [n$] and running it. You can omit ".txt" extension in file name.
New math functions will be implemented:
CEIL (x)
returns ceiling value for [x].
FLOOR (x)
returns floor value for [x].
AND (x, y)
returns bitwise AND of [x] and [y].
OR (x, y)
returns bitwise OR of [x] and [y].
XOR (x, y)
returns bitwise XOR of [x] and [y].
BIT (x, n)
returns [n]-th bit of [x]. Bit numbers start from 0.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.4 version
Program will be translated to Russian.