Description: Function LIST generates wrong results [Writer, LibreLogo, macOS] Steps to Reproduce: 1. PRINT LIST (“Word”) → [u'W', u'o', u'r', u'd'] 2. PRINT LIST (“ABC”, “DEF”) → [u'ABC', u'DEF'] but 3. PRINT LIST (1, 2, 3) → [1, 2, 3] Actual Results: Steps 1. an 2.: If the arguments of LIST are (one or more) strings, the result contains character u before and single quote marks around each element of the resulting list. Expected Results: Step 3.: If the arguments of LIST are (one or more) numbers, the result is a correct list of the numbers of the argument. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.5.1.2 (AARCH64) / LibreOffice Community Build ID: fcbaee479e84c6cd81291587d2ee68cba099e129 CPU threads: 8; OS: Mac OS X 13.3; UI render: default; VCL: osx Locale: de-DE (de_DE.UTF-8); UI: de-DE Calc: threaded
What happens if you print the individual items in the list? I assume the u prefix just means it's unicode format, so this is not a bug If that is not the case, can you upload a test document and some description of how to test? I tried activating the Logo toolbar, but don't really understand how this works https://www.w3docs.com/snippets/python/what-exactly-do-u-and-r-string-prefixes-do-and-what-are-raw-string-literals.html
Created attachment 186390 [details] Tests for Bug 154471
(In reply to eisa01 from comment #1) > What happens if you print the individual items in the list? > > I assume the u prefix just means it's unicode format, so this is not a bug > > If that is not the case, can you upload a test document and some description > of how to test? I tried activating the Logo toolbar, but don't really > understand how this works > > https://www.w3docs.com/snippets/python/what-exactly-do-u-and-r-string- > prefixes-do-and-what-are-raw-string-literals.html Here I tried to print the suspicious LISTs (results after ->): PRINT [u'W', u'o', u'r', u'd'] → Error (extra or missing spaces at brackets?) PRINT [u'W', u'o', u'r', u'd'][0] → Error (extra or missing spaces at brackets?) Here I printed correct LISTs: PRINT [“Word”][0] → Word PRINT ['ABC', 'DEF'][0] → ABC PRINT [1, 2, 3][0] → 1 Hint: In LibreLogo you can get a single part of a LIST by its index in brackets, first element has index 0.
That seems all normal to me If you print a data structure directly, don't be surprised if the programming language presents it like that. Loop through it and print the individual items if you want to print the contents The following produces correct output, and using just "TEXT X" does not even work PENSIZE 30 FILLCOLOR “PURPLE” PENCOLOR “FUCHSIA” SQUARE 360 FONTSIZE 80 x = (“ABC”, “DEF”) TEXT x[0] FORWARD 10 TEXT x[1]