Page 1 of 1

Structures

Posted: Fri May 23, 2003 3:32 pm
by twobits
Hi,
Is it possible to declare a string within a structure to be a certain number of bytes long?

Posted: Fri May 23, 2003 4:07 pm
by dmoc
No, but you could declare a fixed array of bytes and PokeS()/ PeekS() the string in and out.

Posted: Fri May 23, 2003 4:10 pm
by FloHimself
like this:

Code: Select all

Structure your_struct
  stringvar.b[15]
EndStructure

foo.your_struct

PokeS(@foo\stringvar[0], "foo")
Debug PeekS(@foo\stringvar[0])

Posted: Fri May 23, 2003 4:22 pm
by twobits
Thanks a lot mate :)
That c;ears up quite a lot of confusion I had :)

Posted: Fri May 23, 2003 4:30 pm
by Inner
8O thanks a lot, that remove a for next loop.

:oops: