Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-13 Thread Jussi Lahtinen
gt; From: John Rose > To: GambasUsers MailingList > Sent: Mon, 13 Aug 2012 14:31:32 +0100 > Subject: [Gambas-user] Check on entered number having more than 6 digits > not working > > > Fernando, > > The number of digits does matter. The use of this Gambas app i

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-13 Thread Sebi
What about this?? Round(latitude, -6) http://gambasdoc.org/help/lang/round?v3 -Original Message- From: John Rose Date: Mon, 13 Aug 2012 14:31:32 To: GambasUsers MailingList Reply-To: mailing list for gambas users Subject: [Gambas-user] Check on entered number having more than 6

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-13 Thread Emil Lenngren
From: John Rose > To: GambasUsers MailingList > Sent: Mon, 13 Aug 2012 14:31:32 +0100 > Subject: [Gambas-user] Check on entered number having more than 6 digits > not working > > > Fernando, > > The number of digits does matter. The use of this Gambas app is for > >

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-13 Thread nando
ts farther to the right of the 6th decimal point because it's float. -Fernando -- Original Message --- From: John Rose To: GambasUsers MailingList Sent: Mon, 13 Aug 2012 14:31:32 +0100 Subject: [Gambas-user] Check on entered number having more than 6 digits not work

[Gambas-user] Check on entered number having more than 6 digits not working

2012-08-13 Thread John Rose
Fernando, The number of digits does matter. The use of this Gambas app is for maintenance of a database which is used by an Android app that I'm currently developing. I don't intend to discuss why the number of digits matters to the Android app except to say that it does. Thus, the Gambas app is re

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-13 Thread nando
n't matter. It really doesn't!! -Fernando -- Original Message ------- From: John Rose To: GambasUsers MailingList Sent: Sun, 12 Aug 2012 08:09:06 +0100 Subject: [Gambas-user] Check on entered number having more than 6 digits not working > Jussi, > > I've p

[Gambas-user] Check on entered number having more than 6 digits not working

2012-08-12 Thread John Rose
Jussi, I've put the code below into the Fmain class in that Test project and it works OK! The Test project needs a lot more code in order to obtain the Latitude from the database. I'll check it out again with the full project. Public Sub ValueBoxLongitude_KeyRelease() If Key.Code = Key.Return O

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-11 Thread Jussi Lahtinen
I suspect that there was something else wrong with your project. But just in case, I would like to know if someone else can reproduce your problem. Test project is attached. John, can you reproduce your original problem with that test project? Jussi On 11 August 2012 22:10, John Rose wrote:

[Gambas-user] Check on entered number having more than 6 digits not working

2012-08-11 Thread John Rose
Jussi, Gambas 3.2.1 for Lucid from kendek's ppa. PS I've found another solution to the requirement: convert the Float value to a string & check on the length of the number of digits before the decimal point by use of Len, Mid & Instr functions. -- Regards, John +44 1902 331266 +44 7894 211434

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-11 Thread Fabien Bodard
If len(frac(latitude)) sup 8 then... Le 11 août 2012 17:03, "Jussi Lahtinen" a écrit : > I cannot reproduce your problem... What is your Gambas version? > > Jussi > > > > On 11 August 2012 17:51, John Rose wrote: > > > I'm trying to validate an entered Latitude value as having a maximum of > > 6

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-11 Thread Jussi Lahtinen
I cannot reproduce your problem... What is your Gambas version? Jussi On 11 August 2012 17:51, John Rose wrote: > I'm trying to validate an entered Latitude value as having a maximum of > 6 digits after the decimal point. Sometimes it doesn't work. In the case > below, it is 48.590278. This s

[Gambas-user] Check on entered number having more than 6 digits not working

2012-08-11 Thread John Rose
I'm trying to validate an entered Latitude value as having a maximum of 6 digits after the decimal point. Sometimes it doesn't work. In the case below, it is 48.590278. This should be valid, but the 'Message.Info("More than 6 decimal digits - try again")' line is being executed. As you can see from