Bo, You should also try DOUBLE. I believe REAL is limited to 8 Including the decimal and sign.
Jan -----Original Message----- From: "A.G. IJntema" <[email protected]> To: [email protected] (RBASE-L Mailing List) Date: Wed, 7 Mar 2012 12:08:08 +0100 Subject: [RBASE-L] - RE: Strange Missing one hundredth in SUM variable > Hi Bo, > > Why not using currency as type of the variables (and the columns too). > You definitely will find the missing Swedish öre > > Tony > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Of Bo > Franzén > Sent: woensdag 7 maart 2012 11:42 > To: RBASE-L Mailing List > Subject: [RBASE-L] - Strange Missing one hundredth in SUM variable > > Hello, > > I have cashbook as a treasurer in my Swedish chess club and I keep the > records through R:BASE (of course!). It’s a small relational data > base, one master table and only one slave table for information in the > form I utilize. > > There are roughly three transactions a week and all that money is > handled over simply one bank account. Money coming in to the account is > registered in the column inkomst (revenue), money being paid out in > utgift (expense); both those columns are REAL so that utgift can be put > in negative figures. > > In the form, in order to immediately discover mistakes on my side, > I’ve written two variables summing up each column and a third one in > order to inform me of the balance (sw. saldo) in the favour of the > club. That balance should of course be identical with the last > statement of the account I’ve got by post from the bank. Those > variables, Memo Variables, look like this: > > 3 : REAL vinkomst = SUM inkomst FROM plusgiro > 4 : REAL vutgift = SUM utgift FROM plusgiro > 5 : REAL vsaldo = (vinkomst + vutgift) > > The two first variables are shown with only one decimal, in spite of > the fact that there are two in the tables. So inkomst is shown as > 362048.7 and utgift as -290733.9. The correct figures in two digits are > 362048.72 and > -290733.90 and it’s obvious that R:BASE only shows one decimal in > those two first variables. The same can be said when Computing at the > R> promt, while the input is OK when opening the table. But the last > variable above, vsaldo, is (much to my surprise) given in two decimals: > 71314.81, simply reducing our money with one Swedish öre, since the > correct sum is 71314.82. > That is indeed a petty amount, even compared with a US cent! > > So this is certainly no big deal (if it’s not a bug), just annoying. > But how does a solution look like to get this perfectly straight? > > Bo Franzén > Department of Economic History > Stockholm University > >

