Skip to main content
13-Aquamarine
July 1, 2025
Solved

Mathcad Prime Boolean Expression

  • July 1, 2025
  • 2 replies
  • 716 views

I had to program a long expression that runs past the width of the page.  Prime has a means of wrapping a math equation.  Is there a means to wrap an expression as shown below?

 

TR := "Z1P OR Z1G OR Z2PT OR Z2GT OR Z4PT OR Z4GT OR 51T01 OR 87OP OR (50P1 OR 50G1 OR 67P2T OR 67G4T) AND LOP AND 87BLK"

Best answer by Werner_E

The disadvantage of this is that you have to change the text if you change the content of the string.
If this is not a problem for you and you are only looking for a solution to hide the long line, then write it in an area, which you can then collapse and hide.
Alternatively, you can also place the definition to the right of the right margin, in which case it will not be printed when a report is printed.

 

If the string does not protrude too much beyond the right-hand margin, you can also help yourself by using a smaller font.

 

2 replies

25-Diamond I
July 1, 2025

That's just the definition of a string, right?

Prime provides no means to split it in multiple lines, that's only implemented for the four basic arithmetic operations.

But you may use the "concat" function.

TR1:="Z1P OR T1G "

TR2:="OR Z2PT OR "

.....

and then

TR:=concat (TR1, TR2, ....)

 

13-Aquamarine
July 1, 2025

O.K.  Thanks.  I will just have a text block underneath the string that contains the expression I can word wrap.

Werner_E25-Diamond IAnswer
25-Diamond I
July 1, 2025

The disadvantage of this is that you have to change the text if you change the content of the string.
If this is not a problem for you and you are only looking for a solution to hide the long line, then write it in an area, which you can then collapse and hide.
Alternatively, you can also place the definition to the right of the right margin, in which case it will not be printed when a report is printed.

 

If the string does not protrude too much beyond the right-hand margin, you can also help yourself by using a smaller font.

 

18-Opal
July 1, 2025

Generating a SEL setting file?

13-Aquamarine
July 1, 2025

Yes!!   An SEL-411L settings file.