Menu

#60 Boolean literal

v1.0 (example)
closed-fixed
nobody
None
5
2016-08-02
2015-11-17
Sean Walker
No

In the following XML from NC174A, should the "ON" be treated like a boolean literal?

<setStatement>
    <t>
        <![CDATA[SET]]>
    </t>
    <t>
        <![CDATA[     ]]>
    </t>
    <setOther>
        <qualifiedDataName>
            <dataName>
                <cobolWord>
                    <t>
                        <![CDATA[SW-1]]>
                    </t>
                </cobolWord>
            </dataName>
        </qualifiedDataName>
        <t>
            <![CDATA[ ]]>
        </t>
        <t>
            <![CDATA[TO]]>
        </t>
        <t>
            <![CDATA[ ]]>
        </t>
        <t>
            <![CDATA[ON]]>
        </t>
    </setOther>
    <unknown />
</setStatement>

Discussion

  • KrisDS

    KrisDS - 2015-11-18

    I'm not sure. Looking briefly at the spec it seems to talk about ON and OFF as being a "status", not a boolean...

     
  • Sean Walker

    Sean Walker - 2015-11-18

    The definition is a status of the switch which has two values so, technically, it would be a boolean value. If there are other status type fields (I honestly have no idea), then it would be better to put in a generic status tag. My opinion is that, either way, the value would be better off wrapped in something that indicates that it is a value rather than just raw text. I couldn't care less about the "TO" statement. :-)

     
  • KrisDS

    KrisDS - 2015-11-19

    I try to stay close to terms from the spec, when I can. But yes, the structure of the tree should be made cleaner. At the moment that cleanup is something I work on as needed.

     
  • KrisDS

    KrisDS - 2016-08-02

    Added more structure to the SET statement in [r358].

     

    Related

    Commit: [r358]

  • KrisDS

    KrisDS - 2016-08-02
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB