The LO docs for Basic functions contain many examples, but almost none of them disclose the output which would be obtained by running them -- it is "left as an exercise for the reader" to copy-paste the examples into some spreadsheet's Basic macro code and run them to see what happens. It would be a great enhancement if the output from examples were just shown directly in the help text. Here is an illustrative example: The DatePart() function is documented at https://help.libreoffice.org/6.2/en-US/text/sbasic/shared/03030130.html It ends with Example: Sub example_datepart MsgBox DatePart("ww", "12/31/2005") End Sub but does not show what the output would be.
136 functions +22 VBA) The followinge have results in comments : 03120101.xhp Asc 03120111.xhp AscW 03100300.xhp CDate 03030108.xhp CDateFromIso 03030101.xhp DateSerial 03020404.xhp Dir 03130800.xhp Environ 03050300.xhp Error 03080501.xhp Fix 03120301.xhp Format 03080503.xhp Frac 03080801.xhp Hex 03080502.xhp Int 03102300.xhp IsDate 03102400.xhp IsEmpty 03102700.xhp IsNumeric 03104500.xhp IsUnoStruct 03102900.xhp LBound 03120302.xhp LCase replace.xhp Replace 03080701.xhp Sgn 03120403.xhp StrComp 03090410.xhp Switch 03030303.xhp Timer 03103000.xhp UBound 03120310.xhp UCase Some examples with results are grouped : CInt, CDbl, CLng ... Some results may not be so useful : - obvious : Abs, Cos, Sin - contextual : FileAttr, FileExists, FileLen, Curdir, Time, ... - abstract : createObject, IsObject So, sounds more like a case by case task here. An annotation mechanism may help.
Pierre F committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/e48c06ba931d5da0371c2e9b64158aebfbbd9f49 tdf#146902. add DatePart results
interestingly, there's a list here : https://wiki.documentfoundation.org/Documentation/Calc_Functions/List_of_Functions including details and results. so maybe we could link the help pages to their corresponding wiki ?