× 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.



Yes, I figured %EDITW was out of the question, since the constant edit mask already has decimal precision embedded.  It effectively converts the numeric value anyway.  But I didn't follow the obvious logical path that %EDITC would simply make use of %EDITW.

So that being said, a runtime-precision %EDITC might most "easily" be implemented by allowing a variable for %EDITW rather than a constant.  Then users could populate that field at run time.

    myFormattedValue = %editw( myNumeric: wEditMask);

And to take it one step further, allow that value to be created dynamically using a %MASK BIF which would surface QECCVTEC.

    myFormattedValue = %editw( myNumeric:
         %mask( wPrecision: wDecimals: wEditCode: wZeroFill: wCurrency));

ZeroFill and Currency parameters are optional.  And I put "easily" in scare quotes because I have no idea how hard that would be.  But it would be interesting!


On 3/8/2020 7:49 AM, Barbara Morris wrote:
On 2020-03-07 10:45 a.m., Joe Pluta wrote:
...
It might take a little more work to shoehorn it into %editc since there's already an optional parameter for currency, but something like this:
...

Unfortunately, it would take a gigantic amount of work to shoehorn into %editc and %editw. Those work by creating edit masks at compile time, and while (almost?) anything is possible, changing it to be setup at run time would be mega. But ... fun to think about.

Anyway, I guess I was a bit too vague about where I think the compiler could tolerate variables for length and decimals ... after a bit more pondering, I now think that it would pretty much be limited to %CHAR.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.