Finding the end of a flexiable array
Author |
Message |
Intet22
|
Posted: Thu Jun 02, 2011 9:42 am Post subject: Finding the end of a flexiable array |
|
|
I need to wipe the data from my flexible array but i can't figure out how to find the end so I can use a for loop.
Please Help. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Nick
![](http://compsci.ca/v3/uploads/user_avatars/19644337547e837b41d67a.png)
|
Posted: Thu Jun 02, 2011 9:54 am Post subject: Re: Finding the end of a flexiable array |
|
|
use lower () and upper () to find the lower and upper bounds of a flexible array
example:
Turing: | var foo : flexible array 0 .. 1 of int
foo (0) := 5
foo (1) := 10
for i : lower (foo ) .. upper (foo )
put i
end for
|
|
|
|
|
|
![](images/spacer.gif) |
|
|