Hello All
Getting stumped on the symbol for being able to have two variables take the same decision route
I have a Variable called ( HM ) and another called ( VM ) and I can't figure how to have them both take the route.
I could have HM at 25 and then get VM at 25 a little later and the message is the same for both.
Would save the coding with combined
Here is a snap shot drawing
John
Math with Variable
Moderator: Benj
-
- Valued Contributor
- Posts: 1189
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 439 times
- Contact:
Re: Math with Variable
Create a new macro that takes the switch variable as an argument.
Then call new_macro (VM) and new_macro (HM)
Martin
Then call new_macro (VM) and new_macro (HM)
Martin
- JLeith
- Posts: 537
- Joined: Wed Nov 14, 2012 7:49 pm
- Location: British Columbia Canada
- Has thanked: 146 times
- Been thanked: 26 times
- Contact:
Re: Math with Variable
Thank you Martin
I have my program working with the 2 routes I was thinking if there was a ( "OR" ) logic in flowcode
Making it use either of the Variables for 1 route.
All the best
John
I have my program working with the 2 routes I was thinking if there was a ( "OR" ) logic in flowcode
Making it use either of the Variables for 1 route.
All the best
John
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
- JLeith
- Posts: 537
- Joined: Wed Nov 14, 2012 7:49 pm
- Location: British Columbia Canada
- Has thanked: 146 times
- Been thanked: 26 times
- Contact:
Re: Math with Variable
Excellent info Martin
So the HM | VM is a "OR" statement
Off to give it a go
John
So the HM | VM is a "OR" statement
Off to give it a go
John
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Math with Variable
Not a problem, hopefully it's waht you are after?JLeith wrote:Excellent info Martin
Yes it it is.JLeith wrote:So the HM | VM is a "OR" statement
When changing bits: Above is from tutorialspoint
If using a logical then use two lots instead of one.
e.g &&, || etc.
Let us know if it works or not?
Martin
- JLeith
- Posts: 537
- Joined: Wed Nov 14, 2012 7:49 pm
- Location: British Columbia Canada
- Has thanked: 146 times
- Been thanked: 26 times
- Contact:
Re: Math with Variable
Hi Martin
I did the HM | VM and set Variable
Ran into a glitch.... Had to go back to HM and VM
If I came into HM with say 25 and have a code to stop playing the MP3 if the HM says at 25 and the VM goes up.
The hitch came wen HM was at 25 and the VM reached 25 the MP3 file would play due to stop code for HM affect the VM state.
It did work if HM and VM detection.
John
I did the HM | VM and set Variable
Ran into a glitch.... Had to go back to HM and VM
If I came into HM with say 25 and have a code to stop playing the MP3 if the HM says at 25 and the VM goes up.
The hitch came wen HM was at 25 and the VM reached 25 the MP3 file would play due to stop code for HM affect the VM state.
It did work if HM and VM detection.
John
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Math with Variable
If it fails on one condition then the code within decision branch can be altered to deal with that condition.
So long as you know what you want to happen should that condition occur.
So long as you know what you want to happen should that condition occur.
Martin