|
My reading of the API reference indicates that the CEESDCOS procedure doesn't return a value; in other words you can't call it the way you are doing in your EVAL statement below. This is a nuisance, because it prevents you from using it in expressions. I would recommend creating a COS procedure in your own service program, which uses CALLB to get the value from the API. You should still prototype the call, and use CALLP, but remember that there are three arguments: the angle, the resulting cosine, and the feedback code (which is optional). -- Paul Cunnane ______________________________ Reply Separator _________________________________ Subject: Math Bindable API (2) Author: ajkumar@rccl.com at INTERNET Date: 2000-04-05 6:00 pm Hi... When I runthe following code, why is that I get vague results when I use CEESDCOS as a procedure that returns value. But, when I use CALLB to call the same procedure I get right results all the time. Also when I call the program again it bombs with the foll. error The float operation resulted in a value that is too small (C G D F). When I cancel and call the program again, it works.... In other words, it works on every alternate call but the first part gives wrong results! h dftactgrp(*no) bnddir('QILE') * d Cos pr 8f extproc('CEESDCOS') d Parm1 8f d FeedBack 12 * dParm s 8f inz(0.000000000000E+000) dResult s 8f inz dR1 s 13 6 inz dA1 s 13 inz * d FB ds 12 inz d FB1 4b 0 d FB2 3 d FB3 4b 0 d FB4 1 * c eval Result = *zeros c eval Result = Cos(Parm:FB) * c Result dsply * c eval R1 = Result c eval A1 = %editc(R1:'M') c A1 dsply * ************************************************ * c callb 'CEESDCOS' c parm Parm c parm Result * c Result dsply * c eval R1 = result c eval A1 = %editc(R1:'M') c A1 dsply * c eval *inlr = *On Am I doing something wrong here.. thanx ajith +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-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 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.