For j := 0 to 100 do begin temp3 := (UsersShares[j] * Week1SharePrices[j]); PortWorthWeek1 := PortWorthWeek1 + temp3; end;
For some reason lazarus won't let me divide something by PortWorthWeek1.
Any ideas why? It's not a problem with the division or anything as it works with everything else but for some reason it wont let me divide anything bythis number.
This is the code I am using to try and divide using PortWorthWeek1
PortPerChange := (((PortWorth - PortWorthWeek1) * 100) / PortWorth);
But the program crashes when it trys to run this piece of code.
Thanks for the help!
The funny thing is that it works for pretty much the exact same code when used with arrays:
PercentageChange := (((SharePrices[j] - Week1SharePrices[j]) * 100) / SharePrices[j]);
That runs just fine.