cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

inline if statement in programming loop

relayman357
11-Garnet

inline if statement in programming loop

Hi,

I have an old MCAD 15 program I am finally converting to prime.  Is there a short efficient way to implement those if statements in prime?  That VP is an intermediate variable used further down in the program.  Below is a snip showing the if statements.

 

relayman357_0-1730318393502.png

 

thanks,

russ

 

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:relayman357)

Are any of these options of interest, Russ?

 

2024 10 30 C.png

 

Stuart

View solution in original post

5 REPLIES 5
StuartBruff
23-Emerald III
(To:relayman357)

Are any of these options of interest, Russ?

 

2024 10 30 C.png

 

Stuart

Very nice, thank you!

LucMeekes
23-Emerald III
(To:relayman357)

Another option is:

LucMeekes_1-1730321420487.png

But why don't you use the legacy converter?

 

Success!
Luc

StuartBruff
23-Emerald III
(To:LucMeekes)

Or even just the dot (scalar) product ...

 

2024 10 31 A.png

 

Stuart

Thank you, very interesting.   Also, I was ignorant of the converter - thank you!

Announcements

Top Tags