4
考慮以下幾點:問題的消息造型
printMessage[cellexpr_]:[email protected][cellexpr,"Message",
CellLabel->"(slave Kernel)",ShowCellLabel->True,
CellFrameMargins->0,Background->LightBrown,
CellLabelAutoDelete->False];
printMessage[BoxData[RowBox[{RowBox[{"Sin", "::", "\"argx\""}], ": ",
"\"\\!\\(Sin\\) called with \\!\\(2\\) arguments; 1 argument is expected.\""}],
StandardForm]]
Sin[1,1];
- >
(slave Kernel) Sin::argx: Sin called with 2 arguments; 1 argument is expected.
During evaluation of In[1]:= Sin::argx: Sin called with 2 arguments;
1 argument is expected. >>
人們可以看到,自動生成的Message
繼承以前的印刷Cell
風格。爲什麼會發生?以及如何防止這種情況?
@Alexey請考慮在發佈代碼的輸入形式,使得它可以被複製播放。日Thnx。 – Sasha 2011-04-17 01:41:51
讓其他人不必重新輸入boxdata,這裏是''BoxData [RowBox [{RowBox [{ 「仙」, 「::」, 「\」 argx \ 「」}], 「:」, 「\」\\!\\(Sin \\)用\\!\\(2 \\)參數調用; 1個參數\ 預期。\ 「」};]'' – Simon 2011-04-17 01:45:53
@Sasha打我吧! – Simon 2011-04-17 01:46:26