Author Topic: Multi-Assign with arrays of compound type  (Read 2173 times)

0 Members and 1 Guest are viewing this topic.

Charles Pegge

  • Guest
Multi-Assign with arrays of compound type
« on: February 01, 2014, 09:20:38 AM »
Using inner brackets enables structures to be partially filled with data:

Required Oxygen update: (31 Jan 2014)
http://www.oxygenbasic.org/forum/index.php?topic=749.0

Code: [Select]
includepath "$/inc/"
include "console.inc"

def printl print cr

type item
  string n
  single x,y,z
end type

item v[]={ {"one",1},{"two",2},{"three",3,30,300} }

for j=1 to 3
  printl v[j].n tab v[j].x tab v[j].y tab v[j].z
next
printl
WaitKey

Emil_halim

  • Guest
Re: Multi-Assign with arrays of compound type
« Reply #1 on: February 01, 2014, 09:41:18 AM »
 Hi Charles,

again nice C_style approach.

i think this example must move to C_Code folder?   

Charles Pegge

  • Guest
Re: Multi-Assign with arrays of compound type
« Reply #2 on: February 01, 2014, 10:04:29 AM »
I'm currently filing these examples to examples/Constructs