Anonymous
04-24-2005, 10:27 PM
hi
i was experimenting with string pointers, and thought, hey, since regular strings can be accessed like pointers now, why not try it with a string ptr. so, heres the code
youll see when you run it that o[1][0] returns the ASCII value of the letter "c" and [1][1] the ASCII of h. is this the way its supposed to be? shouldnt they return the characters, and not the ascii values?
i was experimenting with string pointers, and thought, hey, since regular strings can be accessed like pointers now, why not try it with a string ptr. so, heres the code
Code:
Dim o As string Ptr
o = CAllocate(3 * Len(String))
o[0] = "just text"
o[1] = "chop"
? o[0]
? o[1]
? o[1][0]
? o[1][1]
youll see when you run it that o[1][0] returns the ASCII value of the letter "c" and [1][1] the ASCII of h. is this the way its supposed to be? shouldnt they return the characters, and not the ascii values?