开发者

Formatting Message arguments

开发者 https://www.devze.com 2023-02-25 09:27 出处:网络
Can anyone explain why the first of these expressions works as expected while the second does not? What is the difference between \"nu开发者_如何转开发mber one\" and DisplayForm@\"number one\"?

Can anyone explain why the first of these expressions works as expected while the second does not? What is the difference between "nu开发者_如何转开发mber one" and DisplayForm@"number one"?

Block[{$MessagePrePrint}, Message[f::event, DisplayForm@"number one"]]

Block[{$MessagePrePrint}, Message[f::event, "number one"]]


The error message is a clue:

An unknown box name (Times) was sent as the BoxForm for the expression. Check the format rules for the expression.

I presume $MessagePrePrint is low level, like $PreRead, and its output needs to be a valid box structure.


Works on my machine (v8.0.1, W7-64):

Formatting Message arguments

0

精彩评论

暂无评论...
验证码 换一张
取 消