Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index



I have not looked at the predefined constants in a while, and I do not remember how I got my list, but it was probably by reading the code.

WARNING: I am about to tell you to download a document containing macros. The document looks just fine if you tell it to disable macros, but, it is a document about macro programming and almost every one of those macros is contained in libraries in the document. So, feel free to not enable them, but you will not be able to click on the buttons in the document to test run the contained macros.

Navigate here:
http://www.pitonyak.org/oo.php

Download OpenOffice.org Macros Explained V4 (or just click on this link)

http://www.pitonyak.org/OOME_4_0.odt


Open the document and search for the text "vbNewLine". This should land you in table 10 Visual Basic-compatible string constants. This table lists 9 of this type of constant, but, they are only available if you enable "compatibility mode" using "Option Compatible" in the module, or, by calling CompatibilityMode(True) in your code before you use these specific constants.

And no, I do not have an exhaustive list of defined constants. The constants defined by the UNO object model, you can obtain using a macro, but I do not think that it is directly related to your question so I will not spend time finding the code that does that; but it is in the document linked above.

And yes, Pi is a defined constant in LO Basic.

Hope this helped at least a little.


On 2018-07-22 16:26, Johnny Rosenberg wrote:
Hi!

I have done some searching and finally I found this at
https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Constants:

”OpenOffice.org Basic predefines several constants. Among the most useful
are:

   - True and False, for Boolean assignment statements
   - PI as a type Double numeric value”

I assume this is true for LibreOffice as well, but I can't find the rest of
the ”several constants”.

At work a use Excel (I don't really want to and it's full of bugs, but at
least I get paid…) and I wrote some macros in VBA. VBA has a lot of
predefined constants, for instance vbNewLine and a lot more, and I'm now trying to find out what constants are available in LibreOffice Basic, since LibreOffice is what I use exclusively at home, so I don't have to reinvent
the wheel.

So a link to a list of ALL predefined Basic constants would be very
appreciated.

Kind regards

Johnny Rosenberg

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.