Re: [Gambas-user] Pointer or something

2015-10-04 Thread Tobias Boege
On Sun, 04 Oct 2015, Moviga Technologies wrote: > Well, just following the logic from variables. If a and b are integers, > and b=2, and then one does a=b, and then Inc a, b is still 2 while a is > 3. > In Gambas, objects are always references. You may find one or the other additional insight f

Re: [Gambas-user] Pointer or something

2015-10-04 Thread Moviga Technologies
> I don't see the relation with structures. What you are talking about is > just the difference between a value and a reference (i.e. a pointer) to > a value. What I mean is I guess that pattern has affected my mindset in the way I think about putting a structure at the right side of an assignmen

Re: [Gambas-user] Pointer or something

2015-10-04 Thread Benoît Minisini
Le 04/10/2015 12:48, Moviga Technologies a écrit : > Well, just following the logic from variables. If a and b are integers, > and b=2, and then one does a=b, and then Inc a, b is still 2 while a is > 3. I don't see the relation with structures. What you are talking about is just the difference b

Re: [Gambas-user] Pointer or something

2015-10-04 Thread Moviga Technologies
Well, just following the logic from variables. If a and b are integers, and b=2, and then one does a=b, and then Inc a, b is still 2 while a is 3. Oh, OK. I though using Struct was just a more simple alternative to a class. Better use a class then. Thanks!

Re: [Gambas-user] Pointer or something

2015-10-04 Thread Benoît Minisini
Le 04/10/2015 12:19, Moviga Technologies a écrit : > Nice :) > > Is there any place in the wiki that explains why this is so? > What do you think it could be otherwise? Note that internally the structure Elements[i] is transformed into a temporary object pointed to the real data so that you can

Re: [Gambas-user] Pointer or something

2015-10-04 Thread Moviga Technologies
Nice :) Is there any place in the wiki that explains why this is so? -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listin

Re: [Gambas-user] Pointer or something

2015-10-03 Thread Jussi Lahtinen
Dim e As Element e = Elements[i] Jussi On Sat, Oct 3, 2015 at 8:46 PM, Moviga Technologies wrote: > > > If I have an array of a Struct called Elements[], and I want to do some > operations on Elements[i], is there anyway I can make > > e As Element be a reference to Elements[i], so that when

[Gambas-user] Pointer or something

2015-10-03 Thread Moviga Technologies
If I have an array of a Struct called Elements[], and I want to do some operations on Elements[i], is there anyway I can make e As Element be a reference to Elements[i], so that when I manipulate e.Title that will be reflected in Elements[i].Title?