Anzahl der Beiträge : 413 Anmeldedatum : 10.09.09 Alter : 39 Ort : Philadelphia PA
Thema: Scripting Operators Di 16 Aug - 22:11
&& - And || - Or ! - I think is not equal but not 100% sure. = Equal
Can someone be so kind to explain to me what these following operators do?
/-/ / / + - - + * +
abs? absolute?
If there are any other known operators which the script uses, post them as well.
EirikhO
Anzahl der Beiträge : 61 Anmeldedatum : 07.04.11 Alter : 30 Ort : Norway
Thema: Re: Scripting Operators Mi 17 Aug - 11:03
+ - means "add then subtract", for instance 1 2 3 + - means "1+2-3".
You also have < and > which are quite obvious, and => which is "more than or equal to", and <= which is "less than and equal to"
/ is divide, - is subtract, + is add and * is multily. No idea about abs.
krtz07
Anzahl der Beiträge : 413 Anmeldedatum : 10.09.09 Alter : 39 Ort : Philadelphia PA
Thema: Re: Scripting Operators Mi 17 Aug - 13:08
I have been using the greater/less/ equal to operators for quite sometime. The one which I am truly carious about is the /-/, I guess that means divade, subtract, then divide again.
Rüdiger Hülsmann Admin
Anzahl der Beiträge : 1204 Anmeldedatum : 25.04.09 Alter : 40 Ort : Potsdam-West, Berlin-Mariendorf
Thema: Re: Scripting Operators Do 18 Aug - 22:09
"1 2 3 + -" is actually 1 - (2+3). Any operator refers to the two values left of it and combined equations are solved from inside out. In this example: "Add 2 and 3 and subtract the result from 1".
When you find combined operators in the script, you'd use brackets in the regular mathematic notation. Another example:
(1+2)*3/(5-4) = 1 2 + 3 * 5 4 - /
"abs" turns the value into an absolute value
/-/ negates the value and turns for example 3 into -3.
krtz07
Anzahl der Beiträge : 413 Anmeldedatum : 10.09.09 Alter : 39 Ort : Philadelphia PA
Thema: Re: Scripting Operators Do 18 Aug - 22:58
Rüdiger Hülsmann schrieb:
"1 2 3 + -" is actually 1 - (2+3). Any operator refers to the two values left of it and combined equations are solved from inside out. In this example: "Add 2 and 3 and subtract the result from 1".
When you find combined operators in the script, you'd use brackets in the regular mathematic notation. Another example:
(1+2)*3/(5-4) = 1 2 + 3 * 5 4 - /
"abs" turns the value into an absolute value
/-/ negates the value and turns for example 3 into -3.
You're the best!
I was using some of those scripting practices in the past; however, I did not know the complete logic behind it until now.