Bug 149627 - MID(cell,start) gives error 'Err:511'
Summary: MID(cell,start) gives error 'Err:511'
Status: CLOSED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
7.2.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-20 00:39 UTC by john
Modified: 2022-06-20 12:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description john 2022-06-20 00:39:25 UTC
Description:
According to the documentation, MID(cell,start) is supposed to give the contents of a string from position `start` until the end of the string.

Documentation link: https://help.libreoffice.org/7.2/lo/text/sbasic/shared/03120306.html

However, using MID in this way gives an error.

The error can be resolved by providing the third argument, eg

MID(cell,start,999) 

works without error.

Steps to Reproduce:
1. Enter 'HELLO WORLD' in A1
2. Enter '=MID(A1,7)' in A2


Actual Results:
Err:511 is dispayed cell A2

Expected Results:
Expect to see 'WORLD' in A2


Reproducible: Always


User Profile Reset: No



Additional Info:
Replace A2 with '=MID(A1,7,999)' and the expected text appears.

I tried this with both 7.2.7.2 and 7.2.6.2, on two different Ubuntu machines (18.04 and 20.04). I did not have access to a 7.3 release, so it would be good if someone else could check that one.
Comment 1 Xisco Faulí 2022-06-20 09:26:18 UTC
@Eike, I thought you might be interested in this issue
Comment 3 Eike Rathke 2022-06-20 10:57:05 UTC
Oh, and the help page pointed to is BASIC, not Calc, which differs. The correct Calc MID() help is
https://help.libreoffice.org/7.3/en-GB/text/scalc/01/04060110.html?DbPAR=CALC#bm_id3154589
so this isn't even valid.
Comment 4 john 2022-06-20 12:33:16 UTC
Thanks for the speedy resolution. 

A minor suggestion -- would be good if the BASIC documention could cross-reference from BASIC functions back to 'calc functions' for cases where there is a direct correspondence. That would have certainly helped me to spot my error here.