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

Username:   Password: 
 RegisterRegister   
 Flexible arrays
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
AsianSensation




PostPosted: Mon May 19, 2003 3:08 pm   Post subject: Flexible arrays

could anyone teach me how to use flexible arrays? the manual didn't help that much. thx
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Mon May 19, 2003 3:10 pm   Post subject: (No subject)

oh, btw, I know it's off the topic, but can anyone also teach me how to use records? I don't know how to use it, never learned it in class.
Catalyst




PostPosted: Mon May 19, 2003 3:10 pm   Post subject: (No subject)

they work just like normal arrays but you can resize them

for example

code:

var test:flexible array 1..1 of int


then to resize it do
code:

new test,10


the upper bound will be changed to ,in this case, 10
AsianSensation




PostPosted: Mon May 19, 2003 3:20 pm   Post subject: (No subject)

can you change the lower bound too?
Catalyst




PostPosted: Mon May 19, 2003 3:22 pm   Post subject: (No subject)

i dont think so
AsianSensation




PostPosted: Tue May 20, 2003 4:00 pm   Post subject: (No subject)

cool, thanks for the help Catalyst.
Martin




PostPosted: Tue May 20, 2003 10:21 pm   Post subject: (No subject)

It'd probably be better to use linked lists, that way you don't need to worry about unused array slots.
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  [ 7 Posts ]
Jump to:   


Style:  
Search: