Bug 4234 - print array[x][y]
Summary: print array[x][y]
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Teresa Thomas
URL:
Keywords:
Depends on:
Blocks: 2246
  Show dependency treegraph
 
Reported: 2007-03-21 13:59 UTC by Andrew Cagney
Modified: 2007-11-19 21:48 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2007-03-21 13:59:38 UTC
 
Comment 1 Stan Cox 2007-04-20 16:37:11 UTC
Actually ArrayType already implements this.  Tested in TestValue.java.
Comment 2 Andrew Cagney 2007-11-19 17:42:02 UTC
or more complex cases such as print arr[1].foo[2]
Comment 3 Teresa Thomas 2007-11-19 18:06:27 UTC
Should work.
eg. from funit-address:

(fhpd) print (*my_cars_list[0]).skoda    
[0.0]
{2,3}
(fhpd) print (*my_cars_list[0]).skoda[0]
[0.0]
2
Comment 4 Teresa Thomas 2007-11-19 21:48:55 UTC
    [] implemented as a Type Operator.
    
    frysk-core/frysk/expr/ChangeLog
    2007-10-26  Teresa Thomas  <tthomas@redhat.com>
    
    	* CExprEvaluator.g (INDEX): New.
    	* CExpr.g (INDEX): New.
    
    frysk-core/frysk/value/ChangeLog
    2007-10-26  Teresa Thomas  <tthomas@redhat.com>
    
    	* TestArray.java (testIndexOneD): New.
    	(testIndexTwoD): New.
    	* ArrayType.java (index): New.
    	* Type.java (index): New.
    	* TypeDecorator.java (index): New.