Re: c structs

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message -----
From: "Chris Bensler" <bensler at mail.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: c structs


>
> Thanks Derek,
>    Now I understand that much.
>
> What about arrays? and fixed length strings?
>
> EG.
>    recName1(1) As Byte
>    recName2 As String * 14
>

using tk_mem.e then

   recName1 = allot(Byte)
   recName2 = allot({14,Byte})

   store(addr, recName1, value1)
   store(addr, recName2, value2)


using low-level, then it depends on where in the structure these values are.
Using this method, you must count the offset from the start of the
structure. The field names represent an offset from the beginning of the
structure. To store and fetch data from the structure, you have to use
either poke() and peek().

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu