05-19-2025, 12:10 PM
(05-19-2025, 11:32 AM)hsiangch_ong Wrote: cannot even change the type after using erase:I'm not a guru, so take this for what it's worth:
i get "name already in use" from the command line. boy i really really hate this error message. could something else be displayed instead?Code: (Select All)redim test(1 to 10) as string
test(1) = "test me"
erase test
redim test(1 to 10) as integer
test(1) = 10000
print "That's all the test folks!"
end
the compilation try revealed above. tried to refigure a string array into an ordinary single string variable. then from a variable-length string to a fixed-length string. cannot use the same name for more than one of those items. this was enforced since quickbasic.
The Wiki says Erase changes the VALUES, so I guess the array is still there.
I find this works:
ReDim test(1 To 10) As String
test(1) = "test me"
Erase test
ReDim test%(1 To 10)
test%(1) = 10000
Print "That's all the test folks!"
End
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) 
Please visit my Website at: http://oldendayskids.blogspot.com/

Please visit my Website at: http://oldendayskids.blogspot.com/