Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Finding the end of a flexiable array
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Intet22




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
Nick




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: