Hi Andras,

> The example below is taken from the documentation of ‘struct’ in pil21.
> In this case ’struct’ no longer returns the address of the memory region.

Hmm, yes, this changed a little. Is mentioned in the @doc/diff file.

It is very useful for atomic result specifications, i.e. to dereference a
pointer for any kind of pointed type:

   : (setq P (%@ "malloc" 'N 32))
   -> 537873387608

   : (struct P 'N -7 -4)  # Store 2 int's, return value as a long
   -> 17179869191  # hex "400000007"

   : (struct P 'I)  # Fetch first int
   -> 7

   : (struct (+ 4 P) 'I)  # Fetch second int
   -> 4


> With this change misc/rcsim.l no longer runs (I’ve learned it the hard way).

Oops, haven't looked at rcsim since pil21 :(


> I would like to ask, that this was intentional ?

Yes, it is a lot more useful, used heavily in e.g. in @lib/net.l.

☺/ A!ex


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to