IonicWind Software

Aurora Compiler => General Discussion => Topic started by: rleon on January 01, 2006, 07:41:56 PM

Title: initialize a structure
Post by: rleon on January 01, 2006, 07:41:56 PM
Happy New Year to everyone!

Having opened my just just arrived Aurora package ;), I am playing with some of the examples posted here.

Is there a way to do this in Aurora to initialize the members of a structure?

structure={x,y,z};



Title: Re: initialize a structure
Post by: Parker on January 01, 2006, 08:22:22 PM
Not at the current time, at least I haven't ever seen it. But hopefully there will be, along with initialized definitions:
struct MyStruct
{
int a;
int b;
int c;
}

MyStruct ms = {1, 2, 3};
int x = 4;
string str = "Hello";
Title: Re: initialize a structure
Post by: Ionic Wind Support Team on January 01, 2006, 08:42:57 PM
All things that are in the works. But will take a bit of time doing rewrites to the YaCC syntax.

Give it some time ;)
Title: Re: initialize a structure
Post by: rleon on January 01, 2006, 09:03:44 PM
It's good to know that all that will be possible. Still have to learn a lot, so I'll go on playing with posted code.
Title: Re: initialize a structure
Post by: Ionic Wind Support Team on January 01, 2006, 09:12:53 PM
Just got this working...

float calc1=1,calc2,calc3=4.5;

Basic variable define/initialize.  Will be in the next update.
Title: Re: initialize a structure
Post by: Ionic Wind Support Team on January 01, 2006, 09:23:50 PM
This works now too.

DEF size=12,weight=400,flags=0,col=0 as int;
Title: Re: initialize a structure
Post by: Zen on January 02, 2006, 05:37:40 AM
This is good news. I like the idea of being able to do this. Keep up the good work Paul.

Lewis