[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2019-12-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

Mike Kaganski  changed:

   What|Removed |Added

   Assignee|libreoffice-b...@lists.free |mikekagan...@hotmail.com
   |desktop.org |
 Status|NEW |ASSIGNED
 OS|Linux (All) |All

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2019-12-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

--- Comment #16 from Commit Notification 
 ---
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/840c3a662012c77b5972c869587acd15ee5a3f03

tdf#59327: DIM should fail in procedures when same-name argument is present

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2019-12-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

Commit Notification  changed:

   What|Removed |Added

 Whiteboard|BSA |BSA target:6.5.0

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2019-12-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

--- Comment #15 from Mike Kaganski  ---
(In reply to Rowland from comment #13)

The problem you see is most likely unrelated to this, and is just a wrong usage
of optional arguments (which should be treated specifically in blocks like "If
(IsMissing(oEvent)) Then ...")

To solve your issues, ask a question on ask.libreoffice.org - and note that the
method body would be needed, not only method signature.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2019-12-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

--- Comment #14 from Mike Kaganski  ---
This is a bug - because the first function
(Do__Error__Optional_argument_is_not_a_variable__Error) should produce a
compile-time error "BASIC syntax error. Variable a already defined." on line
"If False Then Dim anArgument as Boolean". An argument declaration is the same
as Dim; and that should be treated the same as

sub Dim2(arg As Boolean)
  if (arg) Then
Dim a
  else
Dim a
  end if
end sub

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2019-09-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

himajin100...@gmail.com changed:

   What|Removed |Added

 Blocks|107659  |127592


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=107659
[Bug 107659] [META] Macro bugs and enhancements
https://bugs.documentfoundation.org/show_bug.cgi?id=127592
[Bug 127592] [META]LibreOffice Basic, incl,"Option Compatible" modules
-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2019-05-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

himajin100...@gmail.com changed:

   What|Removed |Added

   See Also|https://bugs.documentfounda |
   |tion.org/show_bug.cgi?id=11 |
   |8544|

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2019-05-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

himajin100...@gmail.com changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=11
   ||8544

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2019-04-29 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

--- Comment #13 from Rowland  ---
Is this bug still being worked on? I just ran into this bug like a race car
doing 150 MPH and hitting the wall. What I got is a macro that will open a form
based on the event sent by the button. But being a good programmer I also call
it from other methods using just a form name, therefore both arguments, the
event param and the form name string are both optional. The issue I have is
when I call it to open a form by a name string in stead of an event object I am
getting an "Object Variable not set" error. I understand this is due to this
bug as it is not marking the first argument as missing.

This may not be a bug either, I was supprised that all arguments can be
optional, most other languages require at least the first argument to be
required. 

At any rate if it is a bug I would love to see it fixed because I hate
redundant code. lol

Thanks in advance.

Here is my method declaration.

Sub OpenForm(Optional oEvent as object, Optional sFormName as string)

The idea is that it will open a form based on the event that a button click
would pass in, or by a name passed directly to it from some other method.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2017-07-13 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

Xisco Faulí  changed:

   What|Removed |Added

 CC||xiscofa...@libreoffice.org
   Assignee|lemoyne.cas...@gmail.com|libreoffice-b...@lists.free
   ||desktop.org

--- Comment #12 from Xisco Faulí  ---
Setting Assignee back to default. Please assign it back to yourself if you're
still working on this issue

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2015-02-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59327

LeMoyne Castle lemoyne.cas...@gmail.com changed:

   What|Removed |Added

 CC||lemoyne.cas...@gmail.com
   See Also||https://bz.apache.org/ooo/s
   ||how_bug.cgi?id=116948
   Assignee|libreoffice-b...@lists.free |lemoyne.cas...@gmail.com
   |desktop.org |

--- Comment #7 from LeMoyne Castle lemoyne.cas...@gmail.com ---
Definitely a bug.  Looking at the source and the tests here and at
https://bz.apache.org/ooo/show_bug.cgi?id=116948 it is crystal clear that only
the last optional argument is declared at runtime.  Is a bug because default
values are not available and, even worse, the parameters in the function
prototype are not available as variables at runtime so using 1 optional
parameter causes runtime errors.  

Making more than one optional parameter a source of run-time errors == worse
than useless. Only real workaround is to not use the broken feature and require
all but the last parameter.  

The idea that the Basic programmer MUST use the IsMissing feature to work
around the optional brokenness is weak at best. The fact that IsMissing is and
will always be false because of the way it is implemented makes it appalling. 
Shouting how Basic == 'workarounds required' as in the AOOo forum?  Ludicrous. 
VBA has supported optional parameters with defaulting and IsMissing() for well
over a decade.  

The appropriate recommendation is: always set default values /or use
IsMissing(arg) to ensure that after ALL args are declared by the Basic runtime
they are ALL initialized, except where zero is fine.

ALL Parameters in ALL sub/function declarations should be available for use as
variables within that sub or function. ALL Parameters Always declared in
function scope whether or not values have been passed through them or set by
default.  

I agree that this is fairly low priority, but here is a potential use:  The
IsMissing test allows the function to distinguish between 2,3,4... argument
calls.  An upgraded function library can then tell if it is being called from
old code before the upgrade that obviously didn't know about the optional
params.  The opt args can control the new doings /or transmit more output from
the new routines.  This also allows real time determination of the need for
more or less of safety dance, defaulting, workaround, file format change, etc.
as is appropriate.  
e.g. If Not IsMissing(optArg1) Then '''REM assign to optArg1 only when it was
given 
e.g. If IsMissing(arg1) Then arg1 = new fancy.new.object  '''REM not given one
so create one 

Optional parameters can allow live testing of new stuff in a shared or
delivered function library without requiring the more complex primary routines 
also be updated everywhere before they have been fully tested live.  

Was working another (unfortunately related) issue, found the defaulting
brokenness and remembered this bug.  Will patch strikeboth/strike all three
issues soon.  Taking assignment.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2014-07-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=59327

--- Comment #6 from Bob bobbux...@gmail.com ---
Is this strictly a bug?

LO (and AOO) provide the isMissing() function that can and should be used
before referring to optional parameters.  See the discussion here
https://forum.openoffice.org/en/forum/viewtopic.php?f=9t=69197

LO (and AOO) do have a bug in that isMissing() always returns False for string
variables whether or not the parameter is present which is inconsistent with
the handling of other data types,  See my comments on issue 36737
https://bugs.freedesktop.org/show_bug.cgi?id=36737

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2013-12-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=59327

--- Comment #4 from Noel Power nopo...@novell.com ---
(In reply to comment #3)
 Noel - any thoughts about this one?

Its a bug (although it seems obscure and imho low prio)

The problem here is to do with 'Option Explicit' but in addition needs this
strange conditional Declaration ( that doesn't actually get executed )

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2013-12-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=59327

Joel Madero jmadero@gmail.com changed:

   What|Removed |Added

   Hardware|Other   |All
 Status|UNCONFIRMED |NEW
   Severity|normal  |minor
   Priority|medium  |low
 Ever confirmed|0   |1

--- Comment #5 from Joel Madero jmadero@gmail.com ---
Per Noel's Comment updating fields.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2013-12-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=59327

Joel Madero jmadero@gmail.com changed:

   What|Removed |Added

 CC||jmadero@gmail.com,
   ||nopo...@novell.com

--- Comment #3 from Joel Madero jmadero@gmail.com ---
Noel - any thoughts about this one?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2013-12-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=59327

Regina Henschel rb.hensc...@t-online.de changed:

   What|Removed |Added

 CC||rb.hensc...@t-online.de

--- Comment #2 from Regina Henschel rb.hensc...@t-online.de ---
I do not see that it is connected to optional. You can see the same behavior
without optional.

Can you please explain the line
Do__Error__Optional_argument_is_not_a_variable__Error anArgument:=-123

I do not find a description about the syntax and semantic. From IDE it seems to
produce the same call as
Do__Error__Optional_argument_is_not_a_variable__Error(-123)

For me it seems to be the question how a conditional dim statement is executed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2013-12-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=59327

Jorendc jore...@libreoffice.org changed:

   What|Removed |Added

  Attachment #72968|application/octet-stream|text/plain
  mime type||

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

2013-04-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=59327

--- Comment #1 from Gergő Mocsi gmocs...@gmail.com ---
Successfully reproduced in version 4.1.0.0.alpha0+

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs