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



alternative for %DEC? 

i have a issue i'm trying to resolve. basically i want to use something
similar to %DEC. unfortunately you can't use variable values for digits
& precision with %DEC. here is basically what i want to do:
Code:
                 number = %Dec(%trim(%Subst(Data:FieldDS(Ctr).InBuffer:
                          FieldDS(Ctr).Length)):
                          FieldDS(Ctr).Digits:FieldDS(Ctr).Decimals);
instead of using tons of IFs etc. is there a way to do this? unless
someone has a clever answer i'll end up using this kind of garbage:
Code:
  select;
     when FieldDS(Ctr).Decimals = 1;
        number = %Dec(%trim(%subst(data:fieldds(ctr).InBuffer:
               FieldDS(Ctr).Length)):30:1);
     when FieldDS(Ctr).Decimals = 2;
        number = %Dec(%trim(%subst(data:fieldds(ctr).InBuffer:
               FieldDS(Ctr).Length)):30:2);
which is a major pain....wonder if there is a way for the compiler team
to add this functionality???


Thanks,
Tommy Holden




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.