https://issues.apache.org/ooo/show_bug.cgi?id=118031

--- Comment #12 from mroe <[email protected]> ---
Again. I don't know the implementation of the elements of basic code.
But with further tests I see that all declarations with potentially not static
values will result in a Basic Syntax Error.

Try following:
-----------
Option Explicit

Sub Main
Dim VarInt01 As Integer
VarInt01 = 23
Const ConstInt01 = 2 * VarInt01
End Sub
-----------

So I conclude that a constant from outside of a module is simply read like a
variable. With that and the fact that constants are recognized at compile time
rather than run time I don't know if there is a chance for a change of this
behaviour.

A constant should be a safe defined constant, but look at

---[Modul1]---
Option Explicit
Sub Main
MsgBox c1
End Sub
---[Modul2]---
Option Explicit
Public Const c1 = 23
---[Modul3]---
Option Explicit
Public Const c1 = 47
---------------

-- 
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.
You are watching all issue changes.

Reply via email to