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



Scott K. said:
> The number is a 30S 9, but you're stuffing it into a 15-byte 
> (29-digit)
> packed number.   Why not make peNumber be 29 digits?

You're right.

> [SNIP -- removed data structure and select group]
> > c                   eval      wwRetVal = %subst(CHAR_NUM:
> > c                                               %int(peSize 
> / 2 + 1))
> 
> Is this code correct?   It seems to me that you want peSize/2 
> + 1 to be
> the length of the result, not the offset into the character 
> string?!  Does
> this code work?

It works indeed, as the data is aligned to the right in variable 
CHAR_NUM i use this expresion to get the start-pos for %subst and 
specify no length in order to get the data till the end of the string.

> > Any ideas to improve it ?
> 
> Here's how I'd do it.   Note that I eliminated the SELECT group, and
> simplified the data structure by adding one line of multiplication.
> I changed the logic for the %subst() because I couldn't get your
> logic to work.

Nice... I shoud've realized that using ** i would've avoided the need of
the data structure with different decimal positions.

Thanks again.

Carlos K.



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.