[Gambas-user] [Fwd: Gambas3 Pointers example] signal #6

Jussi Lahtinen jussi.lahtinen at ...626...
Tue Jan 11 19:58:53 CET 2011


Hah! OK, I didn't guess there would be so detailed information!
So, I think this is OK then!

Jussi


2011/1/11 Benoît Minisini <gambas at ...1...>

> > > if i use
> > > s=Str@(pPointer)
> > >
> > > this means
> > > address1=adress2 ?
> >
> > Kind of... even this doesn't change the situation:
> >
> > sTmp = Str@(pPointer)
> > s = sTmp
> >
> > I'm not sure this is good thing, may cause weird bugs and confusion!
> > I think this is because strings are objects in Gambas...
> > maybe Str@() should do internal copy of data, instead of association
> > object1 = object2?
> >
> > What do you think Benoit?
> >
> > Jussi
>
> That both of you should read the wiki page about String@ (or Str@ or
> StrPtr).
> :-)
>
> It returns a constant string. A constant string is just a pointer (and a
> length), no data is copied or allocated. String@ assumes that the pointer
> points at constant data that will not change.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> 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