Talk:Expressions

From FreeCAD Documentation
Jump to navigation Jump to search

Related forum posts

  • PR #2475: Expression syntax extension [1]
  • "Name (optional)" field in sketcher accepts any string [2]
  • space character [3]

Freeform discussion

@Uwestoehr: Good catch, there are indeed many more characters allowed. If you give a negative list, then please extend it to other non allowed characters as well, mainly of course the frequently used blank, but there are of course many more. We have recently even seen that some Korean characters can create problems, so we should consider if it wouldn't be better to give a positive list. If not, please list or describe the characters to be excluded.

I had a look, and really everything is possible as object label, e.g. "Tab üß$" works. Only the operator characters are not working and that becomes clear when looking at the expression code. There is however the issue that for the alias of table cells, one cannot use spaces or umlauts -> I'll bring this to the list because it seems to be a bug.--uwestoehr (talk) 18:10, 20 January 2021 (UTC)
forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=54586 --uwestoehr (talk) 18:23, 20 January 2021 (UTC)

Two-argument separator

@Roy: Regarding the Statistical and Aggregate functions. These are not constrained to spreadsheets, and may be used anywhere. As a consequence, ':' as a separator doesn't work in general expressions. It must be ";" or ", " in cases outside of spreadsheets. How do we differentiate? I'm running 0.18.5; I don't know if ":" works as a general separator in 0.19; it doesn't in 0.18.5. In fact, I believe the expression "A10:A20" should actually be regarded as a *single* argument expression, where the argument is the array of rows. The expression "average(1; 3; 5; 7)" is a valid 4-argument expression; "average(1: 3: 5: 7)" is not.