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



Hi,

I'd go for the following code:

Select;
When WX > 9999;
NumberOfIntegers = 5;
When WX > 999;
NumberOfIntegers = 4;
When WX > 99;
NumberOfIntegers = 3;
When WX > 9;
NumberOfIntegers = 2;
When Wx > *zeros;
NumberOfIntegers = 1;
Other;
NumberOfIntegers = 0;
EndSl;

Of course, if your value can be negative you'll also have to cater for that.

HTH,

Peter Colpaert
Software Engineer - PLM Development Team
Philips Consumer Luminaires
Tel: (+32) 3/459 13 17
Fax: (+32) 3/450 74 33
Address: Industrieterrein Satenrozen 11, 2550 Kontich, Belgium
Email: Peter.Colpaert@xxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Raja Nama
Sent: donderdag 9 september 2010 8:28
To: rpg400-l@xxxxxxxxxxxx
Subject: Need to know how many integer positions are filled in a
variable

Dear All,



Let me explain through examples.



Let us say we have a variable WX of length 13,8.



If I have value 123.3567, I need no. of integer positions filled that
is 3.



If I have value 1009.78061, I need no. of integer positions filled
that
is 4.



Do we have any built in functions to do the same or simple logic will
do.



Regards

Reddy Raja Nama


The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.


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.