Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: suppenhuhn on March 06, 2020, 04:55:45 PM

Title: Change multiple values with one Boolean Parameter
Post by: suppenhuhn on March 06, 2020, 04:55:45 PM
Title: Re: Change multiple values with one Boolean Parameter
Post by: Dragan on March 06, 2020, 05:21:27 PM
Hi
if I understand correctly, let's try this one for a start:



Title: Re: Change multiple values with one Boolean Parameter
Post by: suppenhuhn on March 06, 2020, 05:57:43 PM
Hi
if I understand correctly, let's try this one for a start:
You did !!
The arithmetic expression + sequence into a selector was the key!
Thank you very much  8)
Title: Re: Change multiple values with one Boolean Parameter
Post by: Dragan on March 06, 2020, 06:06:00 PM
Glad to help.
Title: Re: Change multiple values with one Boolean Parameter
Post by: suppenhuhn on March 06, 2020, 06:15:41 PM
But one more question:
When i'd like to "inverse" the boolean value trying to use this expression i got a error:

Code: [Select]
if (Input1 == 0 ) {
  return
1;
}
if (Input1 == 1 ) {
  return
0;
}
Title: Re: Change multiple values with one Boolean Parameter
Post by: Dragan on March 06, 2020, 06:21:19 PM
it should go like this:

RETURN
If(input1==0,1,0);

or

RETURN
if(input1==true,false,true);

Title: Re: Change multiple values with one Boolean Parameter
Post by: suppenhuhn on March 06, 2020, 06:27:35 PM
MERCI !!! Do i read it right:   if input1 is 0 -> return 1 else return 0

Would be awesome when the expressions could handle javascript code
Title: Re: Change multiple values with one Boolean Parameter
Post by: Dragan on March 06, 2020, 06:34:20 PM
Yes, You are reading right.
Some useful documentation:
https://docs.itoosoft.com/railclone/style-editor/operators#Operators-Arithmetic