[Gambas-user] struct

Ronan Chilvers ronan at ...384...
Mon Apr 5 10:01:36 CEST 2004


Hi Frank

...

On Mon, 5 Apr 2004 08:50:07 +0200
> snip _____________________________
> 
> struct adr
>   name as string * 10
>   street as string * 25
>   telefon as string * 20
> end struct
> 
> dim myAdr[] as adr 
> 
> snap _____________________________
> 
> how can i do this..
> 

I think you can probably do it with an Object data type:-

(code may be wrong because I don't know gambas well enough !!!)

In a new class file called myStruct

PUBLIC name AS String
PUBLIC street as String
PUBLIC telephone as String

In a module / form / whatever

PUBLIC z AS myStruct

PUBLIC SUB Form_open()

	z = new myStruct

	z.name = "Fred"
	z.street = "The Street"
	z.telephone = "123456789"

END

Does that help at all ?  Anyone know a better way ?

A quick PS to Benoit - keep up the good work !  Don't know how you're finding the time to release new versions AND bugfix ... make sure you sleep and eat, won't you !!!!!

Ronan
-- 
e: ronan at ...384...
t: 01903 739 997
w: www.thelittledot.com

TheLittleDot is a partnership of
Ronan Chilvers and Giles Webberley

This message has been digitally signed 
to verify sender identity 
( GNUPG 1.2.4 : http://www.gnupg.org )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20040405/1173b84d/attachment.sig>


More information about the User mailing list