Re: Rob: Q: Euphoria 2.6

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

I'd like to see some structure support for Euphoria since when dealing with
the Windows API we need to use structures. Also I would like to see the '^'
(carrot symbol) used to define pointers...

eg:.. }}}
<eucode>

integer Value
?^Value -- displays the address of "Value" rather than the value.
-- make scence?

-- on the note of structure support one idea to do this would be some thing
-- like this... (builtin like "constant")

structre Array={integer el_one, integer el_two, atom el_three, sequence
ptr_four}
-- obviously there is no easy way to support the "object" definition
-- but this way would support user types.

?^Array    -- would display an address (pointer) to the structure
?^Array[3] -- would display an address (pointer) to the 3rd element
?^Array[4] -- pointer to the union/structure at element four.
?Array     -- treated like a normal sequence

-- another example useing pete's asm...
include asm2.e

integer
value
value = 1

atom
asm_code
asm_code = get_asm(
"mav eax [^value] " &
"etc...")

-- no more need for a "resolve_param()"

</eucode>
{{{


I'd like hear some peoples ides on structure/pointer support and weather it
would be suitable for Euphoria.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu