0

can we have the display command with certain conditions ,

For example, if we want to just print things their value are bigger than 7 . in other word how can we have

   Display $( x.val> 7) 

In general, is it possible to have condition on display command?

Richard
  • 177
  • 1
  • 9

1 Answers1

1

Yes, you can use the $ condition on a Display statement like in any, e.g., assignment statement:

Scalar x /2/;

Display$(x>3) 'X is greater than 3';
Display$(x>1) 'X is greater than 1';
Lutz
  • 2,197
  • 1
  • 10
  • 12