October 29, 2025, 11:34:44 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


initialize a structure

Started by rleon, January 01, 2006, 07:41:56 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

rleon

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};




Parker

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";

Ionic Wind Support Team

All things that are in the works. But will take a bit of time doing rewrites to the YaCC syntax.

Give it some time ;)
Ionic Wind Support Team

rleon

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.

Ionic Wind Support Team

Just got this working...

float calc1=1,calc2,calc3=4.5;

Basic variable define/initialize.  Will be in the next update.
Ionic Wind Support Team

Ionic Wind Support Team

This works now too.

DEF size=12,weight=400,flags=0,col=0 as int;
Ionic Wind Support Team

Zen

This is good news. I like the idea of being able to do this. Keep up the good work Paul.

Lewis