div in Informix 4GL
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi Could anyone please tell me about the DIV function in Informix 4GL that would have been current production around February 1993? We are comparing some code written at that time with its counterpart in Oracle PLSQL and I am uncertain as to whether div rounds, truncates, floors etc or whether there are arguments to govern its behaviour. We have no syntax information other than the original code. What would x equal in the following, x = div(18,4) x = div(19,4) I'd be very grateful for any pearls of wisdom, thanks in advance Rod Corderey Lane Associates RodCorderey@Lane-Associates.com http://www.Lane-Associates.com
Rod Corderey wrote: > Could anyone please tell me about the DIV function in Informix 4GL > that would have been current production around February 1993? > > We are comparing some code written at that time with its counterpart > in Oracle PLSQL and I am uncertain as to whether div rounds, > truncates, floors etc or whether there are arguments to govern its > behaviour. We have no syntax information other than the original code. > > What would x equal in the following, > x = div(18,4) > x = div(19,4) > > I'd be very grateful for any pearls of wisdom, I've not heard of the function. That's not to say it wasn't part of the product, but I don't recall coming across it while I was in charge of the team maintaining I4GL from August 93 for a couple of years. So, on average, I'd suspect that the DIV function is actually written as part of your application. You can prove me wrong by finding it defined in one of the I4GL libraries, of course, but it certainly isn't a documented function that I've ever encountered. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Rod Corderey wrote: > > Hi > > Could anyone please tell me about the DIV function in Informix 4GL that > would have been current production around February 1993? > > We are comparing some code written at that time with its counterpart in > Oracle PLSQL and I am uncertain as to whether div rounds, truncates, > floors etc or whether there are arguments to govern its behaviour. > We have no syntax information other than the original code. > > What would x equal in the following, > x = div(18,4) > x = div(19,4) DIV() is NOT a 4GL builtin function or operator. Look around for a 4GL or "C" library function written to implement this function. If you were using R4GL (the p-code version) then the function may have been linked into the p-code runner, otherwise it is in a library object file or one explicitly linked with the 4GL code. Checkout the make file if any or the 4GL compiler menus for hints. Art S. Kagel