Skip to main content
12-Amethyst
October 30, 2024
Solved

inline if statement in programming loop

  • October 30, 2024
  • 2 replies
  • 1341 views

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

 

Best answer by StuartBruff

Are any of these options of interest, Russ?

 

2024 10 30 C.png

 

Stuart

2 replies

23-Emerald V
October 30, 2024

Are any of these options of interest, Russ?

 

2024 10 30 C.png

 

Stuart

12-Amethyst
October 31, 2024

Very nice, thank you!

23-Emerald IV
October 30, 2024

Another option is:

LucMeekes_1-1730321420487.png

But why don't you use the legacy converter?

 

Success!
Luc

23-Emerald V
October 31, 2024

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

 

2024 10 31 A.png

 

Stuart