Feature Requests: Browse | Submit New | Admin

[#7000] wrapping arrays.

Date:
2006-12-01 10:33
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
wrapping arrays.

Detailed description
A request for the ability to specify an array as wrapped, so that shifting 2d arrays one left / right / up / down becomes
possible.

example of a shift to the left:

[1,2,3]
[4,5,6]
[7,8,9]

to 

[2,3,1]
[5,6,4]
[7,8,9]

You demonstrate shifting in your game of life example, but as arrays aren't wrapped, you lose columns / rows.


another example:

array = [1,2,3,4,5,6,7]

array[7]
> 1
array[10]
> 4



array = [
[1,2,3]
[4,5,6]
[7,8,9]
}

In this wrapped array, looking to the right of "6" gives you "4"
array[2,1]
> 6
array[3,1]
>4

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item