Re: 4GL: Decimal type manipulation
Posted in 1998
In article <6vijju$qq5$1@nnrp1.dejanews.com>, drance@my-dejanews.com wrote: > Hi, > > My name is Duncan Rance and I'm working on an Informix-4GL application. > > I am trying to test a DECIMAL(3,1) to see if the digit after the decimal point > is zero, and if so, strip it (and then convert to an integer). I can't find > anything in the manuals to do this - a MOD command would help. > > If anyone can help, could you mail me as well as posting. > There is a MOD function in 4GL and SQL, so for your problem: LET siRemainder = ( decNumber * 10 ) MOD 10 This will work even if the decimal is zero, (in which case siRemainer = 0_ Dennis J. Pimple Principal Consultant Informix Software Inc. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own