
-----------------------------------
smool
Tue Jun 21, 2011 8:29 pm

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

-----------------------------------
Tony
Tue Jun 21, 2011 8:42 pm

RE:Deleting flexible arrays
-----------------------------------
what kind of an error?

Also, what is the value of "lower (books) - 3"?

-----------------------------------
smool
Sat Jun 25, 2011 2:44 pm

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
Sat Jun 25, 2011 2:56 pm

Re: RE:Deleting flexible arrays
-----------------------------------
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
[/code]

-----------------------------------
RandomLetters
Sat Jun 25, 2011 6:05 pm

RE:Deleting flexible arrays
-----------------------------------
Check the documentation of [tdoc]upper[/tdoc] and [tdoc]lower[/tdoc]
