Ask Your Question

Ajohn's profile - activity

2017-04-25 05:04:02 +0200 received badge  Famous Question (source)
2017-01-19 14:19:26 +0200 received badge  Notable Question (source)
2016-06-27 23:21:26 +0200 received badge  Popular Question (source)
2016-06-11 17:13:21 +0200 commented question Calc Basic macro integer arithmetic problem

Well I didn't expect an answer but feel the lack of true integer variables is disgusting.

2016-06-11 17:10:42 +0200 answered a question How to call a simple C/C++ function from a Basic macro

I've no answer to your question but feel I must point out that ooBasic doesn't actually use integer at all. It uses floating point and rounds which wasted several days of my time. Something I just didn't expect and a 1st for any compiler I have ever used.

Personally I found the lack of Basic like syntax function to manipulate spreadsheets really disappointing. The easiest solution seems to be to write more macro's to provide them with the UNO facilities.


2016-06-07 15:45:07 +0200 received badge  Editor (source)
2016-06-07 15:41:41 +0200 asked a question Calc Basic macro integer arithmetic problem

I'm dealing with prime number fractions and have noticed that Calc Basic isn't really using integer. It's rounding if I do a divide for instance rather than truncation. It's using some sort of rounding process. I also then noticed that some integer functions are stated to return double so it looks like pure integer is never used under the hood.

I wonder if there are any compiler options to prevent the rounding or even better force true integer. Mod seems to work ok but as there is no quotient that I am aware of so I have to use divide.

I chose the integer way as the macro has to loop through 4,000 numbers and I can't check all of them. If done in pure integer all numbers have to be ok just on the basis of one being correct. Float has been known to cause problems with what I am doing.