× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



How are you defining the screen field?

What's you code look like now?

Charles

On Tue, Jul 13, 2010 at 11:30 AM, Timothy Adair <tadair@xxxxxxxxxxxxxxxx> wrote:
I want them to be able to do that.  THEY want it to "work like the old
program" (assumed decimal) but I want to ease them into reality.  So I'm
trying to make it work both ways to help transition them.

Example - our price field is 7,4.  If they do not key in a decimal point, it
assumes 4 decimal places ("just like the old program").  If they explicitly
key in a decimal point, then the number is exactly what they keyed in.
Either way I then display the number with the decimal point.

I'm afraid that reading their minds just goes with the territory.  In this
case I know what to do; I just need a simple way to do it.  I could define
the screen field as alpha but that gets ugly because I have to translate
both directions.  And we're talking about dozens of fields across hundreds
of programs.  That's why I'm looking for a simple solution.





"Charles Wilt" <charles.wilt@xxxxxxxxx> wrote in message
news:mailman.38554.1279033790.2580.midrange-l@xxxxxxxxxxxxxxx
I don't understand....

Do your users want to be able to key
15.123
or
15123

And have it be recognized as 15.123?

That's just asking for trouble IMHO....how would you interpret 151?
0.151, 1.150, 11.5, 11.500, 115.000?

While the user may think the system should read their minds, you're
asking for trouble trying to make it do so.

If all you want is for
15
or
15.000

to be seen as 15.000...

Then just defined the field as numeric with 3 decimal places...

If you want to leave the field alpha, then simply use the %dec(myfield:5:3)
BIF.

Charles

On Tue, Jul 13, 2010 at 10:34 AM, Timothy Adair <tadair@xxxxxxxxxxxxxxxx>
wrote:
The simple formula test (if %int(field) = field;) works great to determine
if they keyed in an explicit decimal point, UNLESS they key in a decimal
with all trailing zeroes. IOW, if the number they keyed is an integer, we
assume they did not key a decimal point.

If they key an integer with a decimal point, then the "test" returns True,
even though they did actually key an explicit decimal point.

Sorry, I should probably give a little more info.

I'm currently converting a large quantity of old RPG II programs to
free-format RPG IV, and the users want to be able to enter numeric fields,
with or without keying in a decimal point. So I have to allow them to
enter
data either way, and determine which way they keyed it in, and display it
with the decimal point.





"Vern Hamberg" <vhamberg@xxxxxxxxxxx> wrote in message
news:mailman.38512.1279026764.2580.midrange-l@xxxxxxxxxxxxxxx
Tim

Just curious - what does it matter if they type 15.0000? That is
effectively an integer with far too many extra keystroke, that's all in
one way of looking at it!!

In other words, what does this accomplish?

Vern


On 7/12/2010 1:22 PM, Timothy Adair wrote:
Is there a simple way to determine if a decimal point was explicitly
keyed
in a numeric field? I've tried about every trick (and combination of
tricks) that I can think of.

I can do it programmatically by defining the screen field as alpha and a
second field as numeric but this gets a bit ugly, and could involve
dozens
of fields in hundreds of programs.

The basic test of ---

if %int(field) = field;

--- works fine unless the user keys in a value like 15.0000.


Any ideas?

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.