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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to Convert a String Parameter to a Real Number Parameter?

bduncan
15-Moonstone

How to Convert a String Parameter to a Real Number Parameter?

See the Attachment。

1 REPLY 1

Interesting question.

I am almost sure you cannot do that directly.

But you can do an evaluation of "A"

If there is only a fixed number of "lengths"... values for "A", you can to a inverse comparison:

If A="150"

L=150

If A="100"

L=100

If A="50"

L=50

endif

endif

else

L=1

endif

(something like that...) not positive about the syntax but you get the idea. Just remember the "else" statement in case you run into an anomaly.

...and if the variety of "lengths" is too great, you can just build the if statements using one digit at a time and sum the value as multiples. Through 999, you would only have 27 if statements; 9999 would be 36 if statements. I trust they are always whole numbers?

...if A^1= 2 then L^1=200 if A^2=9 then L^2=90 if A^3=5 then L^3=5 L=L^1+L^2+L^3

Of course, you also have to evaluate the length of A to determine the multiplier.

Announcements
Business Continuity with Creo: Learn more about it here.

Top Tags