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


  • Subject: asdbget - precision
  • From: Sean Porterfield <sporter@xxxxxxxxxxxx>
  • Date: Wed, 15 Mar 2000 17:20:28 -0500
  • Organization: Best Distributing Co.

Toward the end of this function, what is the purpose of "v = -v;" ?
It's what is causing my precision to show as negative on some fields in
my XML (I haven't yet found a pattern or reason).  Before I just comment
it out, I wanted to see if it had a purpose.  It may well be indicitive
of a hidden bug somewhere, of a misunderstanding due to OS400 version
differences.

(I'm on V4R2)

/* Convert a signed decimal field to a C `int' */
static int
signed2int (buf, len)
        Byte *buf;
        int len;
{
  int v = 0;
  while (len)
    {
      v *= 10;
      v += buf[0] & 0x0f;
      len--;
      buf++;
    }
  if ((buf[0] & 0xf0) == 0xd0)
    v = -v;
  return v;
}


+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.