[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: float-integer error with \


On Tue, 22 Apr 2025 at 19:15, Benoît Minisini <
benoit.minisini@xxxxxxxxxxxxxxxx> wrote:

> Le 22/04/2025 à 18:46, Bruce Steers a écrit :
> > Appologies I guess the error is mine.
> > vbSize is a SpinBox and .Value returns a Float.
> > I did not try  iSize = (CInt(vbSize.Value) \ 3) * 3  :-\
> >
> > I'm sure the code worked when i wrote it though.
> >
> > Respects
> > BruceS
> >
>
> In master, SpinBox has been enhanced to support floating point values
> (and other new features). So now its Value property returns a Float,
> which cannot be handled by '\'.
>
> By the way, I don't remember why '\' and 'MOD' cannot automatically
> convert floating points into integers, like the other operators. I see
> no reason at the moment.
>
> Regards,
>
> --
> Benoît Minisini.


Aah I see now, cheers.
Yeah I would have thought \ would convert to Integer as surely it only
really returns an integer and cannot return a float?

Respects
BruceS

References:
float-integer error with \Bruce Steers <bsteers4@xxxxxxxxx>
Re: float-integer error with \Bruce Steers <bsteers4@xxxxxxxxx>
Re: float-integer error with \Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>