Discussion:
[OpenSCAD] Fundamental list comprehension behavior recently changed.
royasutton
2018-11-22 00:04:11 UTC
Permalink
Consider:

echo( version() );
a = "123";
echo ( [ for (i=a) i ] );

For the past several years the result has been:

ECHO: [2018, 6, 1]
ECHO: ["123"]

For the past few days it has been:

ECHO: [2018, 11, 20]
ECHO: ["1", "2", "3"]

Is there a reason for this low-level change? It seems that the type string
has been re-classified.




--
Sent from: http://forum.openscad.org/
Torsten Paul
2018-11-22 00:08:21 UTC
Permalink
Post by royasutton
Is there a reason for this low-level change? It seems that the
type string has been re-classified.
Yes, that is need so not every low level function needs to
handle strings. Specifically this is introduced along with ord().

See https://github.com/openscad/openscad/pull/2509 and linked
discussions.

ciao,
Torsten.

Loading...