[Libreoffice-bugs] [Bug 144185] New: Clarification needed about scope/lifetime of different types of variables
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Mon Aug 30 13:43:42 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=144185
Bug ID: 144185
Summary: Clarification needed about scope/lifetime of different
types of variables
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: mikekaganski at hotmail.com
Documentation for Global keyword [1] is wrong, stating that the keyword is for
scope ("the variable and the array are valid in all libraries and modules for
the current session"). The "for the current session" might attempt to express
the idea of keeping its value between different macro invocations - but in
fact, this is completely unclear from the text, unless you know that yourself.
OTOH, documentation on "Using Procedures, Functions and Properties" [2] tells
that there are differences between scope of Global/Public/Private/Dim variables
- and it obviously has problems. It doesn't discuss scope of the Global
variable (only it keeping its value - but is it visible across modules? across
libraries? between macros in shared libraries and document-defined ones (and in
the opposite direction)?) It tells that Private and Dim variables are only
visible in the module it's defined in - but in fact, it's visible also outside.
This needs clarification (and *maybe* fixing, if some types actually have wrong
scope).
[1]
https://help.libreoffice.org/7.3/en-US/text/sbasic/shared/03103450.html?DbPAR=BASIC
[2]
https://help.libreoffice.org/latest/en-US/text/sbasic/shared/01020300.html?DbPAR=BASIC
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210830/12c988b6/attachment.htm>
More information about the Libreoffice-bugs
mailing list