开发者

Formatting Message arguments

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜