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



And man, do I really love those "general-purpose procedures"!!

As to the long numeric lengths, a worked with a programmer once who had been in Argentina awhile, and he told me the MAPICS guys there had to re-write their code to accommodate the inflated peso, because there wasn't enough room in their numeric variables to handle the big long numbers.... If things keep going in the US like they've been doing, we might need those extra lengths... :)

I've done some, but I think we could exploit them plenty more than we're doing.

Put 'em together with all the API's, the C-functions libraries, and off you go. Pretty soon you get to do some /*real*/ programming... :)

How about Cat( str1: str2: str3: str4: .....str12 )

I've written procedures that concatenate up to about a dozen (character) parameters with VARYING --for some things it simplifies looking at the code--, another that concatenates them with a comma connector, and/or with quoted variables (like for comma-delimited output), and plenty other stuff. ....VARYING character strings for the return value are great for some of these things...

The only drawback sometimes with character-value input parameters with "general purpose procedures" is that any VARYING has to accommodate the longest length you'll need --even once-- during the next ten years. (Or more right?)

I've thought about looking at how I would use null-terminated strings like in C to get around that, but the memory would have to be dynamically (and programatically) controlled anyway....Can't just "instantiate" a null-terminated string on the fly (with its automatic memory allocation) can we?

...Or...maybe one could try a general-purpose procedure and static variables to handle that...... Hmm....

--Alan





------------------- Original message ----------------------
From: Barbara Morris <bmorris@xxxxxxxxxx>

Joe Pluta wrote:
As far back as V5R2 you could have 30 digits, and V5R4 bumped that up to 63.

I still can't figure out a use for 63 digits, but hey, it's there! <grin>


Packed(63,31) is useful for parameters or return values for
general-purpose procedures. It can handle a 31 digit value with any
number of integer or decimal places, a sort of floating point value.
Course, if you want it to handle say a 42 digit integer, you're out of luck.

Or, you can make a good start at counting all the atoms in the universe.
To finish the job, I think you need something like 80 digits. ... Not
to mention some pretty fancy equipment.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.