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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,557 次查看
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 项奖励
1 解答
1,326 次查看
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 项奖励
5 回复数
1,326 次查看
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 项奖励
1,326 次查看
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 项奖励
1,327 次查看
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 项奖励
1,326 次查看
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 项奖励
1,326 次查看
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