-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Tomas Kral Sent: Sunday, 30 April 2017 8:05 PM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] FPGA - SET initialisation
Ah yes, sily me.
But how to best initialise a SET variable with an arbitrary byte / integer?
TYPE ii = POINTER TO iidsc; iidsc = STRUCT i: INTEGER END;
i := b; SYSTEM.PUT(ii,i); SYSTEM.GET(ii,s); (* initialise a set with a byte *) SYSTEM.PUT(ii,i); SYSTEM.GET(ii,s); (* initialise a set with an integer *)
Do you mean how do you typecast an INTEGER / BYTE variable to a SET variable? If so then: VAR s: SET; i: INTEGER; b: BYTE; BEGIN s := SYSTEM.VAL(SET, i); s := SYSTEM.VAL(SET, ORD(b)) I'm curious. What is it that you are trying to do that makes you ask this question? Regards, Chris Burrows CFB Software http://www.astrobe.com/RISC5