<?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 Comment regarding the Jan 11 Binary to Decimal conversion code sample in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/comment-regarding-the-jan-11-binary-to-decimal-conversion-code-sample/m-p/895487#M54164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the Jan 11, 2005 SDN downloadable code sample for converting a Binary number to a Decimal number, form validate_data checks each individual byte of a field called "val" to determine if it is a '1' or '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, another way to do this (I think simpler and more efficient) is to use the CO operator as in the following example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_bin type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: val type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;val = p_bin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if val co ' 01'.                    " Notice the space&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The number is binary&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The number is not binary&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just my two-cents worth.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;James Gaddis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jan 2005 17:17:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-01-11T17:17:05Z</dc:date>
    <item>
      <title>Comment regarding the Jan 11 Binary to Decimal conversion code sample</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comment-regarding-the-jan-11-binary-to-decimal-conversion-code-sample/m-p/895487#M54164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the Jan 11, 2005 SDN downloadable code sample for converting a Binary number to a Decimal number, form validate_data checks each individual byte of a field called "val" to determine if it is a '1' or '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, another way to do this (I think simpler and more efficient) is to use the CO operator as in the following example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_bin type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: val type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;val = p_bin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if val co ' 01'.                    " Notice the space&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The number is binary&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The number is not binary&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just my two-cents worth.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;James Gaddis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2005 17:17:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comment-regarding-the-jan-11-binary-to-decimal-conversion-code-sample/m-p/895487#M54164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-11T17:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Comment regarding the Jan 11 Binary to Decimal conversion code sample</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comment-regarding-the-jan-11-binary-to-decimal-conversion-code-sample/m-p/895488#M54165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;Thanks for your suggestion, and it was really useful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kathirvel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2005 03:31:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comment-regarding-the-jan-11-binary-to-decimal-conversion-code-sample/m-p/895488#M54165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-12T03:31:16Z</dc:date>
    </item>
  </channel>
</rss>

