1. New peeks and pokes
- Posted by mattlewis (admin) Jan 03, 2011
- 1201 views
One of the new features for 4.1 will be new peeks and pokes. peek/poke8 have already been implemented.
The ticket was asking for a way to peek/poke doubles directly, without having to use atom_to_float64(). I think it would also be useful to implement this for 32-bit floating point values. But what to call these? There are two options, I think:
- peek/poke_double and peek/poke_float
- peek/poke_float64 and peek/poke_float32
I think the float64 notation would be more consistent with what we already have, as well as more explicit about what it does.
Additionally, we're going to implement another peek/poke built-in that operates on data the size of a native pointer. This will be important for making it easy to write code that will run on both 32 and 64 bit euphoria. But again, what to call it? My lack of imagination leads me to a couple of possibilities:
- peek/poke_pointer
- peek/poke_ptr
- peek/poke_object (because a euphoria object is always the same size as a pointer)
Matt
2. Re: New peeks and pokes
- Posted by jimcbrown (admin) Jan 03, 2011
- 1143 views
I like peek/poke_float64/32
and peek/poke_pointer
I really dislike peek/poke_object - even though they are the same size, most of the time the pointer is going to represent a C pointer (to a string, struct, or something else) rather than an Euphoria object.