2.6 version
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
2.6 version
Will be adapted for iOS 7.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.6 version
INT() function will work more correctly.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.6 version
Very important addition: now smart BASIC will understand both real and complex numbers.
Numeric variables can contain real and complex numbers.
Numeric variables with real numbers:
A = 10
B = 0.5E2
with complex numbers:
C = 2-3i
D = 1i
All math functions and operations will give proper result according to real or complex operands.
For example, it will be correct to write:
PRINT SQRT(-4)
and to get:
2i
Some commands and functions, for example loops and array indices will use only real component of number.
Numeric variables can contain real and complex numbers.
Numeric variables with real numbers:
A = 10
B = 0.5E2
with complex numbers:
C = 2-3i
D = 1i
All math functions and operations will give proper result according to real or complex operands.
For example, it will be correct to write:
PRINT SQRT(-4)
and to get:
2i
Some commands and functions, for example loops and array indices will use only real component of number.
-
- Posts: 814
- Joined: Tue Apr 09, 2013 12:23 pm
- My devices: iPhone,iPad
Windows - Location: Groningen, Netherlands
- Flag:
2.6 version
All math functions and operations will give proper result according to real or complex operands.
For example, it will be correct to write:
PRINT SQRT(-4)
and to get:
2i
PRINT exp(i*pi)
Will get:
-1 (as it should) ?
For example, it will be correct to write:
PRINT SQRT(-4)
and to get:
2i
PRINT exp(i*pi)
Will get:
-1 (as it should) ?
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.6 version
Yes, of course.Henko wrote: PRINT exp(i*pi)
Will get:
-1 (as it should) ?
It will be written like this:
Code: Select all
PRINT exp(1i*pi)
By the way, you can become beta-tester to test it yourself
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.6 version
New functions will be implemented:
RNDC (x)
returns random complex number with real and imaginary components from 0 to [x], not including [x]. If [x] > 1 then this is an integer number. If 0 <= [x] <= 1 then this is a float number.
Although this is a sequence of random values, it is the same at each program run. Use RANDOMIZE command to change the sequence.
REAL (x)
returns real component of complex number [x].
IMAG (x)
returns imaginary component of complex number [x].
SGNC (x)
SIGNC (x)
return sign of imaginary part of complex number [x]: -1 if [x] < 0, 0 if [x] = 0, 1 if [x] > 0.
RNDC (x)
returns random complex number with real and imaginary components from 0 to [x], not including [x]. If [x] > 1 then this is an integer number. If 0 <= [x] <= 1 then this is a float number.
Although this is a sequence of random values, it is the same at each program run. Use RANDOMIZE command to change the sequence.
REAL (x)
returns real component of complex number [x].
IMAG (x)
returns imaginary component of complex number [x].
SGNC (x)
SIGNC (x)
return sign of imaginary part of complex number [x]: -1 if [x] < 0, 0 if [x] = 0, 1 if [x] > 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.6 version
New example programs will be added.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.6 version
Manual will be updated and redesigned.
Parameter TEXT in FIELD command will be optional.
FIELD and BUTTON commands will be optimized for speed.
New interface object "switch" will be implemented with respective commands:
SWITCH n$ DELETE
deletes switch which name is [n$].
SWITCH n$ STATE k AT x, y
creates switch with name [n$] at point [x,y] with state [k]. If [k] = 0 then switch is off, otherwise it is on. If you need to change switch state or coordinates then just use this command again with the same switch name and new parameters.
SWITCH_STATE (n$)
returns state of switch with name [n$].
On = 1, off = 0.
Parameter TEXT in FIELD command will be optional.
FIELD and BUTTON commands will be optimized for speed.
New interface object "switch" will be implemented with respective commands:
SWITCH n$ DELETE
deletes switch which name is [n$].
SWITCH n$ STATE k AT x, y
creates switch with name [n$] at point [x,y] with state [k]. If [k] = 0 then switch is off, otherwise it is on. If you need to change switch state or coordinates then just use this command again with the same switch name and new parameters.
SWITCH_STATE (n$)
returns state of switch with name [n$].
On = 1, off = 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.6 version
RESET TIMER command will also have better syntax TIMER RESET.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 2.6 version
New user interface object "slider" will be implemented with commands:
slider n$ delete
deletes slider with name [n$].
slider n$ value k at x,y hsize s
creates horizontal slider with name [n$], value [k], at point [x,y] and width [s].
slider n$ value k at x,y Vsize s
creates vertical slider with name [n$], value [k], at point [x,y] and height [s].
slider_value (n$)
returns value of slider with name [n$].
slider n$ delete
deletes slider with name [n$].
slider n$ value k at x,y hsize s
creates horizontal slider with name [n$], value [k], at point [x,y] and width [s].
slider n$ value k at x,y Vsize s
creates vertical slider with name [n$], value [k], at point [x,y] and height [s].
slider_value (n$)
returns value of slider with name [n$].