Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.9K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

GridBox doesn't return the same form when its inputs are the same value

Posted 1 year ago
b1={{1},{2},{3}} 
    b2={{Range[1,1]},{Range[2,2]},{Range[3,3]}}

"b1" and "b2" are set as above mentioned.
As "b1" and "b2" return the same value "{{1},{2},{3}}", "GridBox[b1]" and "GridBox[b2]" return the same "GridBox[{{1},{2},{3}}]" .
But "GridBox[b1]//DisplayForm" and "GridBox[b2]//DisplayForm" return different forms respectively as below:
GridBox[b1]//DisplayForm
    1
    2
    3

GridBox[b2]//DisplayForm
GridBox[{{1}, {2}, {3}}]

If "b2" is changed to "ToExpression[b2]", then "GridBox[b2]//DisplayForm" returns
    1
    2
    3
I don't understand why the "ToExpression" is to be applyed to "b2" when "b1" is same to "b2". A same parameter would not be necessary to be applied by "ToExpression",I think.
The version of Mathematica is 4.1. The below is the notebook atached but becomes a little different from original. But functions and their responses are correct.
Thanks.

POSTED BY: Ichione Ichiro
3 Replies
POSTED BY: Ichione Ichiro
Posted 1 year ago
POSTED BY: Eric Rimbey

Your result is very strange and I cannot reproduce it. I get the same outputs for b1 and b2. I see that you are using a very old version of Mathematica FrontEndVersion->"4.1 for Microsoft Windows", which may be involved with the probem.

Why are you not using TableForm[b1] or Grid[b1], which do not need DisplayForm?

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard