1. New peeks and pokes

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

new topic     » topic index » view message » categorize

2. Re: New peeks and pokes

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.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu