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

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




PostPosted: Tue Jun 21, 2011 8:29 pm   Post subject: Deleting flexible arrays

I know the code too make new values, how do delete? i tried

var books : flexible array 1..4 of int
new books, lower (books) - 3

and it gives me an error
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Jun 21, 2011 8:42 pm   Post subject: RE:Deleting flexible arrays

what kind of an error?

Also, what is the value of "lower (books) - 3"?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
smool




PostPosted: Sat Jun 25, 2011 2:44 pm   Post subject: RE:Deleting flexible arrays

well the value is 4, so if i subract 3 it should go down too 1 should it not?. Like this works if i try to subract 1, but if i try to subract anything higher i get an error
Tony




PostPosted: Sat Jun 25, 2011 2:56 pm   Post subject: Re: RE:Deleting flexible arrays

smool @ Sat Jun 25, 2011 2:44 pm wrote:
it should go down too 1 should it not?

I should have been more clear -- what is the actual value?
code:

var books : flexible array 1..4 of int
put "the actual value is: ", lower (books) - 3
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
RandomLetters




PostPosted: Sat Jun 25, 2011 6:05 pm   Post subject: RE:Deleting flexible arrays

Check the documentation of upper and lower
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  [ 5 Posts ]
Jump to:   


Style:  
Search: