|
Barbara, Oops, posted the earlier version of the code which had the bug you mention. I did in fact have precisely that problem until I saw the error of my ways. Peter -----Original Message----- From: bmorris@ca.ibm.com [mailto:bmorris@ca.ibm.com] Sent: Tuesday, September 11, 2001 3:24 AM To: rpg400-l@midrange.com Subject: RE: Your favorite hex conversion routine - ILE >From: Peter Connell <peterc@baycorp.co.nz> >Date: Mon, 10 Sep 2001 08:32:38 +1200 > >C CallP cvthc(%Addr(OutputHex):%Addr(InputChar): >C %Len(OutputHex)) > >C CallP cvtch(%Addr(OutputChar):%Addr(InputHex): >C %Len(OutputChar)) Peter, watch out for the length parameter to these functions. The length to specify is the number of bytes in the longer parameter. For cvthc, the length is the number of bytes in the result, but for cvtch, the length is the number of bytes in the source. In your call to cvtch, only the first half of OutputChar would have the expected result. Barbara Morris _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. This communication is confidential and may be legally privileged. If it is not addressed to you, you are on notice of its status. Please immediately contact us at our cost and destroy it. Please do not use, disclose, copy, distribute or retain any of it without our authority - to do so could be a breach of confidence. Thank you for your co-operation. Please contact us on (09) 356 5800 if you need assistance.
As an Amazon Associate we earn from qualifying purchases.
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.