If someone is interested, this is how I managed to solve my problem.
I converted this;
Print (y * (1 + y)) / 2
To this (here y is string, not long);
Shell "echo \"(" & y & "*(1+" & y & "))/2\" |bc" To sResult
This is not very quick method, but in my case it is fast enough.
Jussi
On Mon, Apr
> The '*' operator (like '+' and '-') returns the same datatype as its
> arguments. There is no conversion to a bigger datatype if needed, so the
> result is truncated.
Yes, of course.
I was confused because "?3413156131^2" did work.
>> I need really big numbers...
>
> Find a volunteer to impl
> Hi!
> I'm using Gambas 3 rev 2822 @ Ubuntu 9.10 64bit.
>
> To IDE console;
>
> ?3413156131^2
> 1.164963477458E+19
> Right.
>
> ?3413156131*3413156131
> -6797109299126662455
> Wrong.
>
>
> Or in code;
>
> dim y as long = 3413156131
> Print (y * (1 + y)) / 2
>
> Result;
> -339855464785675315
Hi!
I'm using Gambas 3 rev 2822 @ Ubuntu 9.10 64bit.
To IDE console;
?3413156131^2
1.164963477458E+19
Right.
?3413156131*3413156131
-6797109299126662455
Wrong.
Or in code;
dim y as long = 3413156131
Print (y * (1 + y)) / 2
Result;
-3398554647856753152
Wrong.
Also, is there possibility to d