<?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: F$TYPE of space is INTEGER in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6047781#M37141</link>
    <description>&lt;P&gt;That's a bug/inconsistency....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fwiw,&lt;/P&gt;&lt;P&gt;Hein.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DCL&lt;/P&gt;&lt;P&gt;LEXICON&lt;/P&gt;&lt;P&gt;.. F$TYPE&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; TSTL R1 ;NULL STRING?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;BEQL 10$ ;YES, THEN BRANCH&lt;BR /&gt;:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; JSB DCL$CNVASCBIN ;CONVERT THE STRING TO DECIMAL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; TSTL R0 ; Test return status&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BEQL 150$ ;IF SUCCESSFUL, THEN INTEGER&lt;/P&gt;&lt;P&gt;; SYMBOL IS A STRING&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;10$: MOVAB STRING,R2 ;SETUP RETURN DESCRIPTOR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CONVERT&lt;/P&gt;&lt;P&gt;...DCL$CNVASCBIN:: ; CONVERT IN SPECIFIED RADIX&lt;BR /&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BSBW DCL$TRIM ; TRIM AND UPCASE THE STRING&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;CLRL-(SP); SAVE ROOM FOR &amp;nbsp;"NUMBER SEEN" FLAG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MOVL R2,R0 ; TEST FOR ZERO LENGTH STRING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BEQL 70$ ; IF IT IS THE NULL STRING-RETURN ZERO&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 70$:...&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BLBC (SP)+,90$ ; IF A NUMBER SEEN, FLAG OK AS IS&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MOVL #1,R0 ; IF NO NUMBER SEEN, UNCONDITIONALLY&amp;nbsp;SET TO FAILURE&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 90$: RSB ; BACK TO THE CALLER&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2013 02:54:10 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2013-05-01T02:54:10Z</dc:date>
    <item>
      <title>F$TYPE of space is INTEGER</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6047735#M37140</link>
      <description>&lt;P&gt;Who would have thought&amp;nbsp;that f$type of a symbol containing a space is considered to be an integer!&amp;nbsp; It looks more like a string.&amp;nbsp; Oh well, I guess we can code around it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ s = " "&lt;BR /&gt;$ t = f$type(s)&lt;BR /&gt;$ show symbol %&lt;BR /&gt;&amp;nbsp; S = " "&lt;BR /&gt;&amp;nbsp; T = "INTEGER"&lt;BR /&gt;$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the empty string is a string.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$ s = ""&lt;BR /&gt;$ t = f$type(s)&lt;BR /&gt;$ show symbol %&lt;BR /&gt;&amp;nbsp; S = ""&lt;BR /&gt;&amp;nbsp; T = "STRING"&lt;BR /&gt;$&lt;BR /&gt;$ tcpip show version&lt;/P&gt;&lt;P&gt;&amp;nbsp; HP TCP/IP Services for OpenVMS Industry Standard 64 Version V5.6 - ECO 5&lt;BR /&gt;&amp;nbsp; on an HP rx3600&amp;nbsp; (1.59GHz/9.0MB) running OpenVMS V8.3-1H1&lt;/P&gt;&lt;P&gt;$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Lester&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2013 00:25:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6047735#M37140</guid>
      <dc:creator>Lester_Dreckow</dc:creator>
      <dc:date>2013-05-01T00:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: F$TYPE of space is INTEGER</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6047781#M37141</link>
      <description>&lt;P&gt;That's a bug/inconsistency....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fwiw,&lt;/P&gt;&lt;P&gt;Hein.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DCL&lt;/P&gt;&lt;P&gt;LEXICON&lt;/P&gt;&lt;P&gt;.. F$TYPE&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; TSTL R1 ;NULL STRING?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;BEQL 10$ ;YES, THEN BRANCH&lt;BR /&gt;:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; JSB DCL$CNVASCBIN ;CONVERT THE STRING TO DECIMAL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; TSTL R0 ; Test return status&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BEQL 150$ ;IF SUCCESSFUL, THEN INTEGER&lt;/P&gt;&lt;P&gt;; SYMBOL IS A STRING&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;10$: MOVAB STRING,R2 ;SETUP RETURN DESCRIPTOR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CONVERT&lt;/P&gt;&lt;P&gt;...DCL$CNVASCBIN:: ; CONVERT IN SPECIFIED RADIX&lt;BR /&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BSBW DCL$TRIM ; TRIM AND UPCASE THE STRING&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;CLRL-(SP); SAVE ROOM FOR &amp;nbsp;"NUMBER SEEN" FLAG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MOVL R2,R0 ; TEST FOR ZERO LENGTH STRING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BEQL 70$ ; IF IT IS THE NULL STRING-RETURN ZERO&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 70$:...&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BLBC (SP)+,90$ ; IF A NUMBER SEEN, FLAG OK AS IS&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MOVL #1,R0 ; IF NO NUMBER SEEN, UNCONDITIONALLY&amp;nbsp;SET TO FAILURE&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 90$: RSB ; BACK TO THE CALLER&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2013 02:54:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6047781#M37141</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2013-05-01T02:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: F$TYPE of space is INTEGER</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6049771#M37142</link>
      <description>&lt;P&gt;Never take even simple claims at face value.&amp;nbsp; I just tested the sequence described here and got different ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ s = ""&lt;BR /&gt;$ t = f$type(s)&lt;BR /&gt;$ sho sym %&lt;BR /&gt;&amp;nbsp; S = ""&lt;BR /&gt;&amp;nbsp; T = "STRING"&lt;BR /&gt;$ tcpip show version&lt;/P&gt;&lt;P&gt;&amp;nbsp; HP TCP/IP Services for OpenVMS Alpha Version V5.6 - ECO 5&lt;BR /&gt;&amp;nbsp; on an AlphaServer DS25 running OpenVMS V8.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The obvious difference is that I'm on Alpha and running 8.3 (nothing), but this code seems so fundamental to VMS you wouldn't think that it would change.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 22:58:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6049771#M37142</guid>
      <dc:creator>John McL</dc:creator>
      <dc:date>2013-05-02T22:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: F$TYPE of space is INTEGER</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6049773#M37143</link>
      <description>&lt;P&gt;Sorry - my mistake.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A single space character does indeed return type "INTEGER", so does a string of two spaces and even a string of about 30 spaces.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 23:00:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6049773#M37143</guid>
      <dc:creator>John McL</dc:creator>
      <dc:date>2013-05-02T23:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: F$TYPE of space is INTEGER</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6049775#M37144</link>
      <description>&lt;P&gt;Further, it looks like an issue with how VMS converts numeric strings into integers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ s = "0"&lt;BR /&gt;$ t = f$type(s)&lt;BR /&gt;$ sho sym t&lt;BR /&gt;&amp;nbsp; T = "INTEGER"&lt;BR /&gt;$ s = "A"&lt;BR /&gt;$ t = f$type(s)&lt;BR /&gt;$ sho sym t&lt;BR /&gt;&amp;nbsp; T = "STRING"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and here's why I think so ...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$ s = " "&amp;nbsp;&amp;nbsp; ! space character&lt;BR /&gt;$ r = 4&lt;BR /&gt;$ x = r + s&lt;BR /&gt;$ sho sym x&lt;BR /&gt;&amp;nbsp; X = 4&amp;nbsp;&amp;nbsp; Hex = 00000004&amp;nbsp; Octal = 00000000004&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A string that's comprised of a space character, is treated as a 0 when processing integer arithmetic.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 23:07:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6049775#M37144</guid>
      <dc:creator>John McL</dc:creator>
      <dc:date>2013-05-02T23:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: F$TYPE of space is INTEGER</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6049801#M37145</link>
      <description>I haven't looked at the code, but I would expect that leading spaces are ignored in most cases when checking for integers and the result would end up being a zero length which is caught as the code already posted shows.&lt;BR /&gt;&lt;BR /&gt;Dan</description>
      <pubDate>Thu, 02 May 2013 23:52:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6049801#M37145</guid>
      <dc:creator>abrsvc</dc:creator>
      <dc:date>2013-05-02T23:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: F$TYPE of space is INTEGER</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6052637#M37146</link>
      <description>&lt;P&gt;Dan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I agree with Hein. It looks like a bug to me. However, I'd bet that if you report this, VMS engineering will say they can't fix it because folk may be depending on the bug behaviour. The curse of fanatical upwards bug-for-bug compatibility! I've had far more serious bug reports rejected on these grounds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That said, in this case I think I'd reluctantly&amp;nbsp;agree with them. This is very basic stuff, and the behaviour must have been there a very long time. There is a rather unconvincing argument that it could be considered kind of, sort of correct (but that would apply equally to the null string).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;re: John McL&amp;gt; A string that's comprised of a space character, is treated as a 0 when processing integer arithmetic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, all strings have a numeric value, it's just not always obvious what it will be. Most are zero, but not always. For example, here's a good DCL trivia question. How come some of these results are 5?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ r=4
$ s="A String"
$ x=r+s
$   show sym x
  X = 4   Hex = 00000004  Octal = 00000000004
$ s="This String"
$ x=r+s
$ show sym x
  X = 5   Hex = 00000005  Octal = 00000000005
$ s="Yellow string"
$ x=r+s
$  show sym x
  X = 5   Hex = 00000005  Octal = 00000000005
$ s="New string"
$ x=r+s
$ show sym x
  X = 4   Hex = 00000004  Octal = 00000000004
$ s="Forgotten string"
$ x=r+s
$ show sym x
  X = 4   Hex = 00000004  Octal = 00000000004&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 05:04:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6052637#M37146</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2013-05-06T05:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: F$TYPE of space is INTEGER</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6054985#M37147</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;DCL trivia question&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good one John :-)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Lester&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2013 06:21:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-type-of-space-is-integer/m-p/6054985#M37147</guid>
      <dc:creator>Lester_Dreckow</dc:creator>
      <dc:date>2013-05-07T06:21:04Z</dc:date>
    </item>
  </channel>
</rss>

