Post Reply 
Existing CAS commands --> Prime discussion
02-19-2019, 02:52 AM (This post was last modified: 11-08-2019 12:46 AM by compsystems.)
Post: #62
RE: Existing CAS commands --> Prime discussion
undocumented functions and operators

1: increment at 1

PHP Code:
a:=15;
a+=1;  // a  -> 16
a:=a+1// a -> 17, 16+1
increment(a,1); // a -> 18, 17+1
increment(a); // a -> 19, 18+1 

2: decrement at 1
PHP Code:
a:=a-1;  // a  -> 18
decrement(a,1); // a  -> 17
a-=1  // a  -> 16
decrement(a); // a  -> 15 

3: increment
PHP Code:
b:=20;
a:=a+b;  // a  -> 35
increment(a,b); // a  -> 55
a+=b;  // a  -> 75 

4: decrement
PHP Code:
a:=a-b;  // a  -> 55
decrement(a,b); // a  -> 35
a-=// a  -> 15 

5: multcrement
PHP Code:
a:=a*b// a -> 300, 15*20
mulcrement(a,b); // a -> 6000, 300*20
a*=b// a -> 120000, 6000*20 

6: divcrement
PHP Code:
a:=a/b// a -> 6000, 120000/20
divcrement(a,b); // a -> 300, 6000/20
a/=// a -> 15, 300/20 

7: float("3.14") [enter] 3.14
float(10) [enter] 10.0

8: bool( 1 ) [enter] true
bool( 0 ) [enter] false
bool( -1 ) [enter] true
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Existing CAS commands --> Prime discussion - compsystems - 02-19-2019 02:52 AM



User(s) browsing this thread: 1 Guest(s)