discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Fundamental list comprehension behavior recently changed.

R
royasutton
Thu, Nov 22, 2018 12:04 AM

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/

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/
TP
Torsten Paul
Thu, Nov 22, 2018 12:08 AM

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.

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.