Page 1 of 1

Decimalpoint at gets

PostPosted: Mon Feb 02, 2015 9:10 am
by byte-one
If i use a get with picture "@E ###.#" and i use a number z.B. 45,3 all is ok. The cursor goes right the decimalpoint if i type in the "," (or ".").
When i use 100,6 the cursor is not stopping at the last position of the 100 and not waits for type in the ",".
The position after the decimalpoint should only reachable after typing the "," or "."!

Re: Decimalpoint at gets

PostPosted: Mon Feb 02, 2015 4:59 pm
by James Bott
Günther,

I'm not sure what you mean by "should." Do you mean that is the way Clipper did it, or that is the way you think it should be?

Logically, with that picture clause, after you type three digits, there is nowhere else to type any more digits except after the decimal. So, it would seem efficient to skip typing the "," or "." in that case.

However, I can see that it would also be useful if it accepted the comma or period since a user may not be looking at the screen and just typing all numbers the same. Does it also work that way, i.e. the comma or period is optional?

James

Re: Decimalpoint at gets

PostPosted: Tue Feb 03, 2015 10:17 am
by byte-one
James,
However, I can see that it would also be useful if it accepted the comma or period since a user may not be looking at the screen and just typing all numbers the same.

are the absolut right way! Many wrong inputs resulting through skipping the comma in the case above. A separate picture clausula or a clausula in the get itself to switch on/off this behavior would be nice!

Re: Decimalpoint at gets

PostPosted: Tue Feb 03, 2015 12:57 pm
by nageswaragunupudi
byte-one wrote:James,
However, I can see that it would also be useful if it accepted the comma or period since a user may not be looking at the screen and just typing all numbers the same.

are the absolut right way! Many wrong inputs resulting through skipping the comma in the case above. A separate picture clausula or a clausula in the get itself to switch on/off this behavior would be nice!


In fact the behavior is exactly as you wanted. User can type 123.45 or 123,45.
The behavior of (x)Harbour is consistent with the Clipper behavior from the very beginning of Clipper.

Re: Decimalpoint at gets

PostPosted: Tue Feb 03, 2015 5:25 pm
by byte-one
The position after the decimalpoint should ONLY reachable after typing the "," or "."!
This is NOT in the versions of (x)Harbour at this time! The cursor runs automatically over the komma if the number before komma is full in size as in the picture-clausula defined.