• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

how to do a Union in O2

Started by Chris Chancellor, January 15, 2019, 03:01:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chris Chancellor

Hello Charles

in Pb they have a UNION statement to create a data structure for example


UNION ipAddress
   address AS LONG
   octet(1 TO 4) AS BYTE
END UNION


DIM IpAdn AS ipAddress



how do we rewrite this structure in O2 ?

Thanxx in advanced

Charles Pegge

#1
Hi Chris,

unions are much the same in o2:


UNION ipAddress
   address AS LONG
   octet(4) AS BYTE
END UNION

DIM IpAdn AS ipAddress


Chris Chancellor