4.0 version

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

4.0 version

Post by Mr. Kibernetik »

New function will be added:

SYSTEM_LANGUAGE$ ()
returns current user language in format ISO 639-1.

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.0 version

Post by Mr. Kibernetik »

New function will be added:

FRACT (x)
returns fractional part of number [x].

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.0 version

Post by Mr. Kibernetik »

New function will be added:

INTEG (x)
returns integral part of number [x].

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.0 version

Post by Mr. Kibernetik »

New functions will be added:

EVEN (x)
returns 1 if real value [x] is even. Otherwise returns 0.

ODD (x)
returns 1 if real value [x] is odd. Otherwise returns 0.

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.0 version

Post by Mr. Kibernetik »

Accelerometer will be stabilized internally.

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.0 version

Post by Mr. Kibernetik »

New command will be added:

FONT f$ LOAD n$
loads TTF-font from file [f$]. Font name is saved to string variable [n$].

Image

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.0 version

Post by Mr. Kibernetik »

New sample program "pseudo depth.txt" will be added to "Interactive interface" section.

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.0 version

Post by Mr. Kibernetik »

Sample program "play MIDI file.txt" in "Music & Sound" will be updated.

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: 4.0 version

Post by Henko »

Mr. Kibernetik wrote:New function will be added:

INTEG (x)
returns integral part of number [x].
What is the difference between integ() and floor() ?

(When floor() was introduced, the meaning of int() was changed, causing a lot of troubles in existing programs. I had to replace all int()'s by floors()'s. Are we now going to switch from floor() to integ()? )

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.0 version

Post by Mr. Kibernetik »

Code: Select all

n=-2.6
p=2.6
print floor(n);integ(n);int(n);ceil(n)
print floor(p);integ(p);int(p);ceil(p)
gives output:

Code: Select all

-3 -2 -3 -2 
 2  2  3  3
Actually I am still very sorry for that move from standard INT to my own.
You together with ECMA-55 standard were sacrificed for the sake of my uderstanding of what is right and what is wrong. Plus my stupidity of not thinking beforehand about implementation of INT function. Sorry for that!!!

Post Reply