Component Wizard: .= Truncate Operator - How does it work?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Component Wizard: .= Truncate Operator - How does it work?

Jump to solution
1,537 Views
jgirard1
Contributor III

I cannot find any information on the ".= truncate" operator.  There is nothing in the help file explaining how to use it.  I tried some experiements but I saw no results.  Anyone know what it does?

0 Kudos
1 Solution
1,306 Views
ProcessorExpert
Senior Contributor III

Hello,

 

please find the example hot to use ".= truncate operator" below:

 

%:pi = %EXPR(22/7)
%:i = %msg(INFO,%pi)
%:pi_trunc .= %pi
%:i = %msg(INFO,%pi_trunc)

 

You can put this code for example into drv file. It should display two messages with pi and pi_trunc values consequently.

 

best regards
Vojtech Filip
Processor Expert Support Team

View solution in original post

0 Kudos
5 Replies
1,306 Views
ProcessorExpert
Senior Contributor III

Hello,

 

please see the enclosed pdf documentation on operators in PEx macro language.

 

best regards
Vojtech Filip
Processor Expert Support Team

0 Kudos
1,306 Views
jgirard1
Contributor III

That does not tell me how to use it.  I have tried several things and nothing works.  Can you please provide an example?

0 Kudos
1,307 Views
ProcessorExpert
Senior Contributor III

Hello,

 

please find the example hot to use ".= truncate operator" below:

 

%:pi = %EXPR(22/7)
%:i = %msg(INFO,%pi)
%:pi_trunc .= %pi
%:i = %msg(INFO,%pi_trunc)

 

You can put this code for example into drv file. It should display two messages with pi and pi_trunc values consequently.

 

best regards
Vojtech Filip
Processor Expert Support Team

0 Kudos
1,306 Views
jgirard1
Contributor III

Thank you for the explanation.

 

Everytime I ask a question here in the forums, I learn new magic keywords.

 

I cannot find anything in the help file for %EXPR and %msg keywords.  Though I can infer how they work from your example, how would I ever know these two keywords exist unless they are documented somewhere?  Why are they not in the Help file? 

 

I wonder how many other magic keywords are missing in the Help file.  No wonder it is so difficult and confusing to use this product.  The documentation is terrible.

 

Is there an update to the Help file or other doucmentation that exists that can be downloaded?

0 Kudos
1,306 Views
ProcessorExpert
Senior Contributor III

Hello,

 

please find attached the Macro-Language_Reference_Manual.pdf file which fully describes PEx macro language (EXPR, msg, substring, .... etc). This file will be published within upcomming CW V10.2. 

 

We are sorry for the inconvenience.

 

best regards
Vojtech Filip
Processor Expert Support Team