|
I have never used the c runtime on the 400, lol, THAT is the problem, guess I will be learning it... thanks for the push in the right direction... Karen Brasier I.T. Department - Software Analyst Standard Furniture Manufacturing Co. Bay Minette, Alabama 36507 (251) 937-6741 ext 8848 There are 10 kinds of people in the world, those that understand binary and those that do not. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Wilt, Charles Sent: Wednesday, January 12, 2005 1:55 PM To: RPG programming on the AS400 / iSeries Subject: RE: longitude / latitude distance calculations Karen, What's the problem? The code you posted is easily converted to RPG IV. You're going to want to use the C runtime library to get access to the C trigonometry functions (sin, cos, acos, ect). To do that, include the following h-spec: H BNDDIR('QC2LE') DFTACTGRP(*NO). There's a manual that describes each function and provides a C prototype for it. Translating a C prototype to RPG IV is not to tricky and these particular functions are quite easy. Here's one to get you started: C prototype double sin(double x); RPG IV prototype to call C function d sin pr 8f extproc('sin') d radians 8f value The other option, is to simply use the code in a ILE C module. That is after all the beauty of ILE. You can mix and match languages with ease. HTH, Charles Wilt iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121
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.