Skip to main content
added keyword back ticks
Source Link
Chris K
  • 20.6k
  • 3
  • 41
  • 79

Is there a way to Print a message suitable for Message? I want to recycle some messages (but Print them, so they don't get suppressed after X times and look like Print output).

E.g.

Test::message="This is test number `1`."; Message[Test::message,1] 

enter image description here

Desired functionality:

PrintMessage[Test::message,1] (* This is test number 1. *) 

The inserting parts between back ticks is what really had me confused.

Is there a way to Print a message suitable for Message? I want to recycle some messages (but Print them, so they don't get suppressed after X times and look like Print output).

E.g.

Test::message="This is test number `1`."; Message[Test::message,1] 

enter image description here

Desired functionality:

PrintMessage[Test::message,1] (* This is test number 1. *) 

Is there a way to Print a message suitable for Message? I want to recycle some messages (but Print them, so they don't get suppressed after X times and look like Print output).

E.g.

Test::message="This is test number `1`."; Message[Test::message,1] 

enter image description here

Desired functionality:

PrintMessage[Test::message,1] (* This is test number 1. *) 

The inserting parts between back ticks is what really had me confused.

Became Hot Network Question
Tweeted twitter.com/StackMma/status/1318069392811360256
Source Link
Chris K
  • 20.6k
  • 3
  • 41
  • 79

Print a Message

Is there a way to Print a message suitable for Message? I want to recycle some messages (but Print them, so they don't get suppressed after X times and look like Print output).

E.g.

Test::message="This is test number `1`."; Message[Test::message,1] 

enter image description here

Desired functionality:

PrintMessage[Test::message,1] (* This is test number 1. *)