RE: Handling Structured Memory

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

> Have you looked at structs.e Don?
> It's almost identical syntax.
> 
> Chris

Actually yes I did.  I was very impressed.  Its a very good example of 
structured programming imo.  Only thing I didnt like about it was the 
use of strings (structures) as the member items.

ie:
RGBQUAD = define_c_struct({
    { "Red",      BYTE, 1 },
    { "Blue",     BYTE, 1 },
    { "Green",    BYTE, 1 },
    { "Reserved", BYTE, 1 }
})

Very very close to the same thing.  But mine uses integers in place of 
your strings.  In the example above, it would take 112 bytes of memory 
(I think), where mine takes 48.  Around a 42% improvement.  Plus 
searching for an integer is mucho faster than string searching.

Just a difference of opinion.  If it gets the job done the underlying 
method matters not.

Don

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

Search



Quick Links

User menu

Not signed in.

Misc Menu