Bug 5370 - print arr[1:2]
Summary: print arr[1:2]
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-11-20 15:34 UTC by Andrew Cagney
Modified: 2007-12-17 16:21 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-11-20 15:34:25 UTC
Slice an array, returning a sub-section of the array.
Comment 1 Teresa Thomas 2007-11-21 20:15:39 UTC
    Slice operation for array types.
    
    frysk-core/frysk/value/ChangeLog
    2007-11-21  Teresa Thomas  <tthomas@redhat.com>
    
    	* ArrayType.java (slice): New.
    	* Type.java (slice): New.
    	* TypeDecorator.java (slice): New.
    	* TestArray.java (testSlice): New test.
    
    frysk-core/frysk/expr/ChangeLog
    2007-11-21  Teresa Thomas  <tthomas@redhat.com>
    
    	* CExprEvaluator.g (SLICE): New.
    	* CExpr.g: Add grammar for slice operation.
Comment 2 Teresa Thomas 2007-11-26 22:59:35 UTC
Similar feature for pointers:

    Slice operation for pointers. Format - ptr[i:j]
    
    frysk-core/frysk/value/ChangeLog
    2007-11-26  Teresa Thomas  <tthomas@redhat.com>
    
    	* PointerType.java (slice): New.
    	* TestPointer.java (testCharPointerSlice): New test.
Comment 3 Teresa Thomas 2007-11-26 23:12:26 UTC
Slice for arrays/pointers containing null value fails.
Comment 4 Teresa Thomas 2007-11-28 22:07:22 UTC
    Re-write slice for pointers, simplify.
    
    frysk-core/frysk/value/ChangeLog
    2007-11-28  Teresa Thomas  <tthomas@redhat.com>
    
    	* PointerType.java (slice): Re-write.
    	* ArrayType.java (slice): Remove FIX-ME comment.