Fundamental list comprehension behavior recently changed.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Fundamental list comprehension behavior recently changed.

royasutton
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/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Fundamental list comprehension behavior recently changed.

tp3
On 22.11.18 01:04, royasutton wrote:
> 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.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten