Issue 125953 - error message "Inadmissible data type ..." is issued; but only during debuging; without debugging everything seems normal
Summary: error message "Inadmissible data type ..." is issued; but only during debugin...
Status: CLOSED DUPLICATE of issue 63614
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: 4.1.1
Hardware: PC Windows 7
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-17 22:36 UTC by Johann Schmidt
Modified: 2017-05-20 09:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sample program for stringarithmetic using cells B4 and B5 as input and making some calculation with them (10.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-12-17 22:36 UTC, Johann Schmidt
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Johann Schmidt 2014-12-17 22:36:56 UTC
Created attachment 84302 [details]
Sample program for stringarithmetic using cells B4 and B5 as input and making some calculation with them

I wrote a small program for string arthmetic. Everithing went fine until a used the instruction

    stxt = iif( (sig < 0), "-", "")

After I inserted this instruction into the code I got various unclear error messages.

Sometimes (but not every time) I got an error already when entering the VBA-editor (Tools->Macro->Organise Macros->OpenOffice Basic ... // string_test.ods->Standard->Module1->StrgPlusMinus // Edit)

The Error message at that point is: "Argument not optinal" at any of the 5 Subroutine calls within this short program.

Pushing the complie button yields no error

But when one of the functions is called from the spreadsheet (for example because a new value is entered in cell B4) it throws the error message "Inadmissible value or data type. Data type mismatch" in line 70 or 71.

When I do not enter the VBA-editor everything seems to work OK; no error messages and correct results.

I know about the work around (if .. then .. else .. endif) but I would like to know whats wrong with my program.
Comment 1 oooforum (fr) 2014-12-19 10:48:49 UTC
IIF is fragile in Basic

*** This issue has been marked as a duplicate of issue 63614 ***