[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: float-integer error with \
[Thread Prev] | [Thread Next]
- Subject: Re: float-integer error with \
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Tue, 22 Apr 2025 17:46:24 +0100
- To: Gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
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 On Tue, 22 Apr 2025 at 17:31, Bruce Steers <bsteers4@xxxxxxxxx> wrote: > this code did work... > > Dim iSize As Integer > iSize = (vbSize.Value \ 3) * 3 > > Now it says error Got Float but Integer expected. > I tried using a float and various Cint usages but got the same error. > I tried all sorts and always got the error using backslash \ > > I fixed with replacing backslash for Floor.. > Dim iSize As Integer > iSize = Floor(vbSize.Value / 3) * 3 > > A problem with backslash division perhaps? > > Respects > BruceS > >
Re: float-integer error with \ | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
float-integer error with \ | Bruce Steers <bsteers4@xxxxxxxxx> |