Array v. Class properties anomaly

I have used RB and Xojo since 2005 but have recently found a problem which I have not noticed before -
I have an iterative math process which simulates multiple objects in orbit, animated on a Canvas. Fun, not scientific. Trying to update it, I changed from arrays to a Class object where the properties replace the former array variables.
The problem is that in the process which runs with array variables, calculating small numbers, everything is as expected. But when using Class properties, the ongoing result has an accumulative error. Both are declared as doubles.

Can anyone tell me if this is to be expected and that Class properties can not be used like this?
If the above explanation is not clear enough, a small project which displays the problem can be downloaded from this page of my web site - if anyone has time and patience to check it.
http://www.flyonahook.me.uk/hidden2.html

What’s going on here? The link to my web site does not work correctly. I have not had this problem in any other forum.
If it doesn;t work for you, please copy the following and paste to your browser:
http://www.flyonahook.me.uk/hidden2.html

Well, that second one was not meant to be a link, but it works. I think I don’t understand the format of this forum.
It would be useful to be able to edit one’s own postings to avoid messing about like this.

When you click insert link, it puts a useless example.com into the link.
url =http://example.com]link text [/url

If you amend the link text, it shows your site but still sends you to example.com.
Essentially the bit you amended was equivalent to the ‘click me’ words you see, not the target url.

Ive downloaded the project and cant see why the diff is happening yet
I had a theory that maybe defining all the variables on one row

dim a,b,c as double

…was perhaps treating one or more of them as variants.
But changing them to sequence of
dim a as double
dim b as double
etc

hasnt made a difference, so its not that.

But I cant shake off the feeling that we have a variant in here somewhere…

Thanks for trying, Jeff. You apparently think it should work so maybe there is a flaw in my treatment but I can’t see it. I have always declared like variables on one line and never had a (noticeable ) problem.
BTW, I should have said there is an explanatory note in Win1 of the project - probably you have spotted it.

In processClass
for each i1 as Item in Items
newvectory=0

in processArray
for n=0 to 2
newvectorx=0
newvectory=0

if you add in processClass the newvectorx=0 then all will work

[quote=230630:@John Sunderland]Well, that second one was not meant to be a link, but it works. I think I don’t understand the format of this forum.
It would be useful to be able to edit one’s own postings to avoid messing about like this.[/quote]

Don’t bother with the link feature. Just paste the URL and the forum will transform it into a link.

Antonio won. I couldn’t find it. :slight_smile:

Thank you, Antonio. I am sure I must be old enough to admit I’m an idiot (probably many times over)
Now I just have to figure out where is a similar error in the main programme. Tomorrow, I need to go to bed now.