Welcome! Log In Create A New Profile

Advanced

OOPS & structure

Posted by Carlo Hermus 
Carlo Hermus
OOPS & structure
March 21, 2008 07:49PM
I was trying to create a class with variables like strings, ints and structure. But I get the error that structure is a wlanguage, is it not possible to use structure within classes?

Regards,
Carlo
Peter van Vuuren
Re: OOPS & structure
March 21, 2008 10:35PM
Hi Carlo,

Quote
Carlo Hermus
But I get the error that structure is a wlanguage, is it not possible to use structure within classes?

Indeed, you can't declare a structure in a class.
Possible is to declare the structure in the class declaration code-part but before the real class declaration


MyStruct is Structure 
i is int
s is strng
END

MyClass is class
mX is int
mY is string 
mZ is MyStruct
END

...

--
Peter

Carlo Hermus
Re: OOPS & structure
March 21, 2008 11:13PM
Tnx Peter, nice trick.

Cheers,
Carlo
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: