Deprecated: Function create_function() is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Load.php on line 178

Deprecated: Function create_function() is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Load.php on line 183

Deprecated: Function create_function() is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Load.php on line 184

Deprecated: Function create_function() is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Load.php on line 220

Deprecated: Function create_function() is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Load.php on line 223

Deprecated: Function create_function() is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Load.php on line 235

Deprecated: Function create_function() is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Load.php on line 250

Deprecated: Function create_function() is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Load.php on line 268
how to do a Union in O2

Author Topic: how to do a Union in O2  (Read 221 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris Chancellor

  • Sr. Member
  • ****
  • Posts: 308
how to do a Union in O2
« on: January 15, 2019, 03:01:54 AM »
Hello Charles

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

Code: [Select]
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

Offline Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
    • Charles Pegge
Re: how to do a Union in O2
« Reply #1 on: January 15, 2019, 06:59:16 AM »
Hi Chris,

unions are much the same in o2:

Code: [Select]
UNION ipAddress
   address AS LONG
   octet(4) AS BYTE
END UNION

DIM IpAdn AS ipAddress
« Last Edit: January 15, 2019, 07:00:51 AM by Charles Pegge »

Offline Chris Chancellor

  • Sr. Member
  • ****
  • Posts: 308
Re: how to do a Union in O2
« Reply #2 on: January 15, 2019, 04:22:25 PM »
Thanxx a lot Charles