[Gambas-user] How do I override an Array class?

Emil Lenngren emil.lenngren at ...626...
Sun Jun 17 18:06:35 CEST 2012


Instead of overriding, why not simply create a module that does things with
your array instead?

Instead of
Public Function Decode(ivar as String[], pattern as Integer[]) as
Variant[]

in some new array-class,

you can simply have
Public Function Decode(array As Variant[], ivar as String[], pattern as
Integer[]) as
Variant[]

in the new module.

/Emil

2012/6/17 Benoît Minisini <gambas at ...1...>

> Le 17/06/2012 15:49, tobi a écrit :
> >>>
> >>
> >> Didn't know what?
> >>
> >
> > That '[', ']' are not allowed in project file names. So the only reason
> for which I was able to
> > override Variant[] was because I didn't use the IDE?
> >
>
> At the moment, I think that it works. But I may change in the future.
>
> This is the reason why the compiler allows it. It does not care.
>
> But the interpreter have a special treatment with classes whose name
> ends with '[' and ']'.
>
> I try to avoid breaking projects as Gambas evolves as much as possible.
> So, as a security, I prefer to allow the less possible characters in
> class names.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list