Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying more than one elements in an array.

Status
Not open for further replies.

thibault

Programmer
Sep 8, 1999
44
US
define variable array1 as integer extent 10.<br>
define variable i as integer initial 1.<br>
<br>
do i = 1 to extent(array1):<br>
set array1 = i.<br>
display i.<br>
display array1.<br>
end.<br>
<br>
when i run this all i get is <br>
<br>
i array1<br>
____ _____<br>
10 10<br>
<br>
why won't it display all of the elements? i'm used to c++. this makes no sense to me.<br>
<br>
thanks in advance,<br>
bobbie "in chicago":)
 
I guess, you have to put &quot;display&quot; in decremental loop,once
you assign all values to array.

You must be having high value for loop increment variable,once you finish assigning values to array.So only you should you reverse loop( decremental loop) for &quot;display&quot; your array values.

Hope this helps you.

Regards

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top