I've been dipping my toes in Open/LibreOffice Basic today for the first time, and I found it very frustrating. The syntax is ugly and unwieldy, and the documentation I found (at the OpenOffice wiki) is incomplete. That it balks when I accidentally write a semicolon at the end of a line is the least of my worries. I'm a competent programmer in C, C++, Java, Perl, so the kind of documentation I'm looking for is short, to the point and precise.
The concrete questions that I have right now are:
1) Are the logical operators conditional or not? I'm used to writing, e.g., an "AND" expression and not caring if the right-hand argument actually evaluates if the left-hand one is False.
2) Isn't there some way to initialize an array which I declare at the module level? I have two arrays in my program which are really constant arrays, so I'd like to fill them and declare them constant, but it's not clear to me how that can be done.
3) when I declare a Boolean variable at module level, is it guaranteed to be initialized as False? I know have one, called initDone, which tracks if the initialize function has been called which fills those arrays from the previous question.
In case you're interested, here is what I have so far:
Don't mind the body of the main function BizInterest - I've been using it partly just to play and find out how to work with Date variables. Because, well, that's also poorly documented. The object of the function is to calculate the legal interest that is due on overdue invoices according to the Dutch legal rules, so I can incorporate this in my "Reminder" template. The two arrays are the rates over time of the Dutch legal interest rates and the dates the rates were set (always Jan 1st or July 1st).
The concrete questions that I have right now are:
1) Are the logical operators conditional or not? I'm used to writing, e.g., an "AND" expression and not caring if the right-hand argument actually evaluates if the left-hand one is False.
2) Isn't there some way to initialize an array which I declare at the module level? I have two arrays in my program which are really constant arrays, so I'd like to fill them and declare them constant, but it's not clear to me how that can be done.
3) when I declare a Boolean variable at module level, is it guaranteed to be initialized as False? I know have one, called initDone, which tracks if the initialize function has been called which fills those arrays from the previous question.
In case you're interested, here is what I have so far:
Don't mind the body of the main function BizInterest - I've been using it partly just to play and find out how to work with Date variables. Because, well, that's also poorly documented. The object of the function is to calculate the legal interest that is due on overdue invoices according to the Dutch legal rules, so I can incorporate this in my "Reminder" template. The two arrays are the rates over time of the Dutch legal interest rates and the dates the rates were set (always Jan 1st or July 1st).
via International Skeptics Forum http://ift.tt/1XurSuu
Aucun commentaire:
Enregistrer un commentaire