<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HP Pascal SELECT and SELECTONE expressions in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939758#M35429</link>
    <description>Great explanation, John.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
    <pubDate>Thu, 08 Feb 2007 20:58:01 GMT</pubDate>
    <dc:creator>Jeremy Begg</dc:creator>
    <dc:date>2007-02-08T20:58:01Z</dc:date>
    <item>
      <title>HP Pascal SELECT and SELECTONE expressions</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939754#M35425</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm writing a Pascal program which uses the SELECT and SELECTONE statements introduced in HP Pascal V6.  The only documentation I can find is the description in the Release Notes and there's something I need clarified.&lt;BR /&gt;&lt;BR /&gt;I'm assuming that the data types of the 'select-selector' expression and the 'select-label-list' expressions have to be the same, or at least type-compatible.  But do they have to be ordinal types, or can they be more complex?  For example, can these expressions be character strings?&lt;BR /&gt;&lt;BR /&gt;(Yes, I know I can do this by making the 'select-selector' the boolean constant TRUE and then having each 'select-label-list' consist of string comparisons producing TRUE or FALSE results.)&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;        Jeremy Begg</description>
      <pubDate>Tue, 06 Feb 2007 19:40:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939754#M35425</guid>
      <dc:creator>Jeremy Begg</dc:creator>
      <dc:date>2007-02-06T19:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: HP Pascal SELECT and SELECTONE expressions</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939755#M35426</link>
      <description>Hi Jeremy&lt;BR /&gt;&lt;BR /&gt;you are right. There is no documentation online (yet).&lt;BR /&gt;I would expect to find the documentation for Pascal V6 on the following page:&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/pascal.html" target="_blank"&gt;http://h71000.www7.hp.com/doc/pascal.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;Heinz</description>
      <pubDate>Wed, 07 Feb 2007 03:22:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939755#M35426</guid>
      <dc:creator>Heinz W Genhart</dc:creator>
      <dc:date>2007-02-07T03:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: HP Pascal SELECT and SELECTONE expressions</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939756#M35427</link>
      <description>Hi Jeremy,&lt;BR /&gt;&lt;BR /&gt;  I'd expect ordinal types, but then HP Pascal frequently surprises me in the way it pushes boundaries ;-)&lt;BR /&gt;&lt;BR /&gt;  I expect you'll get an authoritative answer from John Reagan soon...</description>
      <pubDate>Wed, 07 Feb 2007 20:20:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939756#M35427</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2007-02-07T20:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: HP Pascal SELECT and SELECTONE expressions</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939757#M35428</link>
      <description>Here's some background on how I arrived on SELECT/SELECTONE.&lt;BR /&gt;&lt;BR /&gt;An outstanding wishlist item was to CASE on character strings.  Something like:&lt;BR /&gt;&lt;BR /&gt;CASE string-expression OF&lt;BR /&gt;&lt;BR /&gt;'ABC': stmt1;&lt;BR /&gt;'DEF': stmt2;&lt;BR /&gt;END;&lt;BR /&gt;&lt;BR /&gt;However, I would have to start dealing with errors like:&lt;BR /&gt;&lt;BR /&gt;CASE string-expression OF&lt;BR /&gt;&lt;BR /&gt;'ABC': stmt1;&lt;BR /&gt;'DEF': stmt2;&lt;BR /&gt;'ABC   ': stmt3;&lt;BR /&gt;END:&lt;BR /&gt;&lt;BR /&gt;While trying to figure out the best place to do that (the internal structures were not prepared for string values), I mumbled to myself "Gee if only CASE could just do the FIRST one it found, then I wouldn't have to do any checking at all.  Just dump the 'problem' back on the user."  (I'm such a nice guy, eh?)&lt;BR /&gt;&lt;BR /&gt;While in the compiler looking at CASE, I saw that I use the BLISS SELECT statement (which only takes ordinal values) as:&lt;BR /&gt;&lt;BR /&gt;SELECTONE True OF&lt;BR /&gt; SET&lt;BR /&gt; [CH$EQL(.Expr,'ABC')]: ...&lt;BR /&gt; [CH$EQL(.Expr,'DEF')]: ...&lt;BR /&gt; TES;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I said, "Ah, if I allow full run-time expressions and define an 'order of evaluation' for the SELECT parts, that will let me provide a 'CASE over strings' plus with SELECT vs SELECTONE, you can get even more power.&lt;BR /&gt;&lt;BR /&gt;So off I went to re-implement BLISS' SELECT and SELECTONE statements into Pascal.&lt;BR /&gt;&lt;BR /&gt;With that background, the SELECT selector must be an ordinal type.  The way you 'CASE on strings' is:&lt;BR /&gt;&lt;BR /&gt;SELECTONE True OF&lt;BR /&gt;String-expression = 'ABC': ...&lt;BR /&gt;String-expression = 'DEF': ...&lt;BR /&gt;END;&lt;BR /&gt;&lt;BR /&gt;John&lt;BR /&gt;&lt;BR /&gt;PS As for adding it to the documenation, we didn't update the docset for V6.0.  The release notes is the only place for the information right now.  I hope to update it next time as I have a few more customer requests I'd like to add.  (spoiler alert: I've had several requests for the compiler to understand/generate 64bit descriptors for conformant array parameters.)</description>
      <pubDate>Thu, 08 Feb 2007 09:56:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939757#M35428</guid>
      <dc:creator>John Reagan</dc:creator>
      <dc:date>2007-02-08T09:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: HP Pascal SELECT and SELECTONE expressions</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939758#M35429</link>
      <description>Great explanation, John.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Thu, 08 Feb 2007 20:58:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/hp-pascal-select-and-selectone-expressions/m-p/3939758#M35429</guid>
      <dc:creator>Jeremy Begg</dc:creator>
      <dc:date>2007-02-08T20:58:01Z</dc:date>
    </item>
  </channel>
</rss>

