<?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 Use which lexical? in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951546#M22503</link>
    <description>now, i can assign a symbol as below:&lt;BR /&gt;$ sh sym syma&lt;BR /&gt;  SYMA = "    keyword:                57"&lt;BR /&gt;&lt;BR /&gt;i want the number "57"(this length will be changed, sometimes 57(2-bits), or 102(3-bit))&lt;BR /&gt;but i can not think out a way to get it through f$element or f$extract...&lt;BR /&gt;do you have any idea ?</description>
    <pubDate>Wed, 11 Jan 2006 06:18:02 GMT</pubDate>
    <dc:creator>Davor_7</dc:creator>
    <dc:date>2006-01-11T06:18:02Z</dc:date>
    <item>
      <title>Use which lexical?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951546#M22503</link>
      <description>now, i can assign a symbol as below:&lt;BR /&gt;$ sh sym syma&lt;BR /&gt;  SYMA = "    keyword:                57"&lt;BR /&gt;&lt;BR /&gt;i want the number "57"(this length will be changed, sometimes 57(2-bits), or 102(3-bit))&lt;BR /&gt;but i can not think out a way to get it through f$element or f$extract...&lt;BR /&gt;do you have any idea ?</description>
      <pubDate>Wed, 11 Jan 2006 06:18:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951546#M22503</guid>
      <dc:creator>Davor_7</dc:creator>
      <dc:date>2006-01-11T06:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Use which lexical?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951547#M22504</link>
      <description>This gets the value of the number &lt;BR /&gt; x=F$NUMBER(f$element(1,":",syma))&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jan 2006 06:30:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951547#M22504</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2006-01-11T06:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Use which lexical?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951548#M22505</link>
      <description>I think Ian means F$INTEGER &amp;amp; not F$NUMBER.</description>
      <pubDate>Wed, 11 Jan 2006 06:40:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951548#M22505</guid>
      <dc:creator>John Abbott_2</dc:creator>
      <dc:date>2006-01-11T06:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Use which lexical?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951549#M22506</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Assuming the symbol definition only varies after the colon (:),&lt;BR /&gt;you have two (2) possibilities:&lt;BR /&gt;1. x = f$integer(f$element(1,":",syma))&lt;BR /&gt;2. x = f$integer(f$extract(10,f$length(syma),syma))&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Kris (aka Qkcl)&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jan 2006 06:40:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951549#M22506</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2006-01-11T06:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Use which lexical?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951550#M22507</link>
      <description>Davor,&lt;BR /&gt;&lt;BR /&gt;well, use Ian's answer, but F$NUMBER should be replaced by F$INTEGER.&lt;BR /&gt;&lt;BR /&gt;-- and most of the time, you do not need the explicit F$INTEGER at all.&lt;BR /&gt;If you need the number without leading zeroes, just use the symbol name. If used in numeric calculations, the value is automagically converted.&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Wed, 11 Jan 2006 06:40:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951550#M22507</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2006-01-11T06:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Use which lexical?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951551#M22508</link>
      <description>yes&lt;BR /&gt;&lt;BR /&gt; x=F$integer(f$element(1,":",syma))&lt;BR /&gt;&lt;BR /&gt;It should be - this is what you get from not copying directly from the terminal window :-)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jan 2006 06:55:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951551#M22508</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2006-01-11T06:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use which lexical?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951552#M22509</link>
      <description>&lt;BR /&gt;F$ELEM is the way to go normally.&lt;BR /&gt;&lt;BR /&gt;There is one more technique that is often overlooked (unknown) which can give you the answer quickly: String subtraction!&lt;BR /&gt;&lt;BR /&gt;If you know the exact string for " keyword", let's say "TEST", then the solution can be:&lt;BR /&gt;&lt;BR /&gt;$ syma = " TEST:57"&lt;BR /&gt;$ number = syma - " TEST:"&lt;BR /&gt;$ show symb number&lt;BR /&gt;  NUMBER = "57"&lt;BR /&gt;$ write sys$output f$type(number)&lt;BR /&gt;INTEGER&lt;BR /&gt;$ other_number = syma - "TEST" - ":"&lt;BR /&gt;$ show symb other_number&lt;BR /&gt;  OTHER_NUMBER = " 57"&lt;BR /&gt;$ write sys$output f$type(other_number)&lt;BR /&gt;INTEGER&lt;BR /&gt;$ &lt;BR /&gt;&lt;BR /&gt;Note also how you do not need to strips spaces or do an explicit integer convert.&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jan 2006 07:55:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951552#M22509</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-01-11T07:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Use which lexical?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951553#M22510</link>
      <description>thanks all&lt;BR /&gt;i think the lexical function is very great :)</description>
      <pubDate>Wed, 11 Jan 2006 19:15:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951553#M22510</guid>
      <dc:creator>Davor_7</dc:creator>
      <dc:date>2006-01-11T19:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use which lexical?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951554#M22511</link>
      <description>close it :p</description>
      <pubDate>Wed, 11 Jan 2006 19:15:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-which-lexical/m-p/4951554#M22511</guid>
      <dc:creator>Davor_7</dc:creator>
      <dc:date>2006-01-11T19:15:13Z</dc:date>
    </item>
  </channel>
</rss>

