Post Reply 
IFTE odd behaviour
10-11-2019, 08:36 PM
Post: #7
RE: IFTE odd behaviour
It's a tricky one:

IFTE means

IF is_true THEN was_true ELSE was_somethingelse

I would expect to either evaluate to was_true if {} is considered true, or was_somethingelse if it is anything other than true.
I think {} would fall in the "other than true" category, hence it should return was_somethingelse, or perhaps a list with the result of was_somethingelse inside.

Returning 0 doesn't do was_true or was_somethingelse, therefore it's more like this:

IF is_true THEN was_true ELSE was_somethingelse BUTIFNONEOFTHEABOVE do_whaaat?

adding a third possible execution path that does not evaluate either of the 2 statements provided, returning an arbitrary outcome that nobody wants or expects.
My expectation would be that one of the statements would be evaluated at least once.

I think when the list is empty, list processing should be disabled and the empty list should simply be considered an object, and judged either {} = true, or {} = false by (some) definition. Just define it, document it, and done. Definitely not return 0 in my opinion.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
IFTE odd behaviour - BruceH - 10-11-2019, 10:55 AM
RE: IFTE odd behaviour - Tim Wessman - 10-11-2019, 11:09 AM
RE: IFTE odd behaviour - rprosperi - 10-11-2019, 05:36 PM
RE: IFTE odd behaviour - rprosperi - 10-12-2019, 01:40 PM
RE: IFTE odd behaviour - Carsen - 10-12-2019, 06:41 PM
RE: IFTE odd behaviour - rprosperi - 10-12-2019, 10:49 PM
RE: IFTE odd behaviour - BruceH - 10-11-2019, 06:18 PM
RE: IFTE odd behaviour - Tim Wessman - 10-11-2019, 12:32 PM
RE: IFTE odd behaviour - ijabbott - 10-11-2019, 04:36 PM
RE: IFTE odd behaviour - Claudio L. - 10-11-2019 08:36 PM
RE: IFTE odd behaviour - David Hayden - 10-11-2019, 08:52 PM
RE: IFTE odd behaviour - Albert Chan - 10-11-2019, 09:09 PM
RE: IFTE odd behaviour - Wes Loewer - 10-12-2019, 06:38 AM
RE: IFTE odd behaviour - John Keith - 10-12-2019, 11:41 AM
RE: IFTE odd behaviour - StephenG1CMZ - 10-12-2019, 08:26 AM
RE: IFTE odd behaviour - Wes Loewer - 10-12-2019, 11:00 AM
RE: IFTE odd behaviour - Wes Loewer - 10-12-2019, 11:46 AM
RE: IFTE odd behaviour - John Keith - 10-12-2019, 11:50 AM
RE: IFTE odd behaviour - rprosperi - 10-16-2019, 04:25 PM
RE: IFTE odd behaviour - rprosperi - 10-17-2019, 03:29 PM



User(s) browsing this thread: 1 Guest(s)