<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: The problem of ?</title>
	<link>http://alterlife.org/2006/10/22/the-problem-of/</link>
	<description>The world, according to AlternateLifeform.</description>
	<pubDate>Thu, 28 Aug 2008 10:43:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Dr. Why</title>
		<link>http://alterlife.org/2006/10/22/the-problem-of/#comment-18557</link>
		<pubDate>Fri, 30 May 2008 21:18:45 +0000</pubDate>
		<guid>http://alterlife.org/2006/10/22/the-problem-of/#comment-18557</guid>
					<description>One more correction to the first post: To prove this an integer in Progress is a 32 bit (4 bytes) signed numeric field where the number of unique values = 4,294,967,296.

NOT 4,294,967,295 as stated earlier which left out the zero value.</description>
		<content:encoded><![CDATA[<p>One more correction to the first post: To prove this an integer in Progress is a 32 bit (4 bytes) signed numeric field where the number of unique values = 4,294,967,296.</p>
<p>NOT 4,294,967,295 as stated earlier which left out the zero value.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Dr. Why</title>
		<link>http://alterlife.org/2006/10/22/the-problem-of/#comment-18556</link>
		<pubDate>Fri, 30 May 2008 21:13:15 +0000</pubDate>
		<guid>http://alterlife.org/2006/10/22/the-problem-of/#comment-18556</guid>
					<description>Continued (corrected and faster evaluator program).

/* tips_int_range.p */
/* count valid unique numbers that can be placed into an integer data type */

def var a_int_32 as int   no-undo.
def var b_int_64 as int64 no-undo.

/* ------------------------------------------------------------------------- */
/*                      maximum integer unique numbers                       */
/* ------------------------------------------------------------------------- */
Evaluate_Integer:
do while true.
/* ------------------------------------------------------------------------- */
/*                      maximum integer unique numbers                       */
/* ------------------------------------------------------------------------- */
  a_int_32 = 0 no-error.
  if error-status:error then
    leave Evaluate_Integer.
  else
    b_int_64 = 1.                 /* count zero value */
  
/* ------------------------------------------------------------------------- */
/*                      compute number of positive unique numbers            */
/* ------------------------------------------------------------------------- */
  assign
    a_int_32 = 2147483646         /* maximum (2147483647) - 1 */
    b_int_64 = b_int_64 + a_int_32.
  
  EI_Positive:
  do while true:
    a_int_32 = a_int_32 + 1 no-error.
    if error-status:error then
      leave EI_Positive.  
    else
      b_int_64 = b_int_64 + 1.    /* count positive value */
  end.

/* ------------------------------------------------------------------------- */
/*                      compute number of negative unique numbers            */
/* ------------------------------------------------------------------------- */
  assign
    a_int_32 = -2147483647        /* minimum (-2147483648) + 1 */
    b_int_64 = b_int_64 + abs(a_int_32).

  EI_Negative:
  do while true:
    a_int_32 = a_int_32 - 1 no-error.
    if error-status:error then
      leave EI_Negative.  
    else
      b_int_64 = b_int_64 + 1.    /* count negative value */
  end.

  leave Evaluate_Integer.
end.

/* ------------------------------------------------------------------------- */
/*                      display maximum                                      */
/* ------------------------------------------------------------------------- */
display b_int_64 format &quot;-&amp;#62;,&amp;#62;&amp;#62;&amp;#62;,&amp;#62;&amp;#62;&amp;#62;,&amp;#62;&amp;#62;9&quot;
                 label &quot;Integer (32) Capacity&quot;.</description>
		<content:encoded><![CDATA[<p>Continued (corrected and faster evaluator program).</p>
<p>/* tips_int_range.p */<br />
/* count valid unique numbers that can be placed into an integer data type */</p>
<p>def var a_int_32 as int   no-undo.<br />
def var b_int_64 as int64 no-undo.</p>
<p>/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
/*                      maximum integer unique numbers                       */<br />
/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
Evaluate_Integer:<br />
do while true.<br />
/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
/*                      maximum integer unique numbers                       */<br />
/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
  a_int_32 = 0 no-error.<br />
  if error-status:error then<br />
    leave Evaluate_Integer.<br />
  else<br />
    b_int_64 = 1.                 /* count zero value */</p>
<p>/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
/*                      compute number of positive unique numbers            */<br />
/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
  assign<br />
    a_int_32 = 2147483646         /* maximum (2147483647) - 1 */<br />
    b_int_64 = b_int_64 + a_int_32.</p>
<p>  EI_Positive:<br />
  do while true:<br />
    a_int_32 = a_int_32 + 1 no-error.<br />
    if error-status:error then<br />
      leave EI_Positive.<br />
    else<br />
      b_int_64 = b_int_64 + 1.    /* count positive value */<br />
  end.</p>
<p>/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
/*                      compute number of negative unique numbers            */<br />
/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
  assign<br />
    a_int_32 = -2147483647        /* minimum (-2147483648) + 1 */<br />
    b_int_64 = b_int_64 + abs(a_int_32).</p>
<p>  EI_Negative:<br />
  do while true:<br />
    a_int_32 = a_int_32 - 1 no-error.<br />
    if error-status:error then<br />
      leave EI_Negative.<br />
    else<br />
      b_int_64 = b_int_64 + 1.    /* count negative value */<br />
  end.</p>
<p>  leave Evaluate_Integer.<br />
end.</p>
<p>/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
/*                      display maximum                                      */<br />
/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- */<br />
display b_int_64 format &#8220;-&gt;,&gt;&gt;&gt;,&gt;&gt;&gt;,&gt;&gt;9&#8243;<br />
                 label &#8220;Integer (32) Capacity&#8221;.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Dr. Why</title>
		<link>http://alterlife.org/2006/10/22/the-problem-of/#comment-18554</link>
		<pubDate>Fri, 30 May 2008 20:40:34 +0000</pubDate>
		<guid>http://alterlife.org/2006/10/22/the-problem-of/#comment-18554</guid>
					<description>Although Progress calls ? the unknown value it is not a value at all. 

/* tips_unknown.p */
/* the unknown value is not a value at all */

def var a_unknown  as char no-undo.
def var b_num_len  as int  no-undo.
def var c_num_asc  as int  no-undo.
def var d_str_sub  as char no-undo.

assign
  a_unknown = ?
  b_num_len = 123.

assign
  b_num_len =    length(a_unknown).
  c_num_asc =       asc(a_unknown).
  d_str_sub = substring(a_unknown,1,1).

display 
    a_unknown label &quot;unknown&quot; 
    b_num_len label &quot;length&quot;
    c_num_asc label &quot;ASC value&quot;
    d_str_sub label &quot;1st character&quot;.


To prove this an integer in Progress is a 32 bit (4 bytes) signed numeric field where the number of unique values = 4,294,967,295. 

See: http://oiswww.eumetsat.org/WEBOPS/eps-pg/Common/EPS-PG-A4EPSNativeFormatDataTypes.htm

This program illustrates that every single bit combination for the Progress Integer data type is used for a valid number yet it still can be represented by the unknown value.

/* tips_int_range.p */
/* count valid unique numbers that can be placed into an integer data type */

def var a_int_32 as int   no-undo.
def var b_int_64 as int64 no-undo.

Evaluate_Integer:
do while true.
  a_int_32 = 0 no-error.
  if error-status:error then
    leave Evaluate_Integer.
  else
    b_int_64 = 1.                 /* count zero value */
  
  EI_Positive:
  do while true:
    a_int_32 = a_int_32 + 1 no-error.
    if error-status:error then
      leave EI_Positive.  
    else
      b_int_64 = b_int_64 + 1.    /* count positive value */
  end.

  a_int_32 = 0.  

  EI_Negative:
  do while true:
    a_int_32 = a_int_32 - 1 no-error.
    if error-status:error then
      leave EI_Negative.  
    else
      b_int_64 = b_int_64 + 1.    /* count negative value */
  end.
end.

display b_int_64 format &quot;-&amp;#62;,&amp;#62;&amp;#62;&amp;#62;,&amp;#62;&amp;#62;&amp;#62;,&amp;#62;&amp;#62;9&quot;
                 label &quot;Integer (32) Capacity&quot;.

Therefore, the Progress unknown value is not a value but an attribute or state of the field.

How Progress &quot;stores&quot; this &quot;unknown value&quot; in a database or in memory is still a mystery.

As far as there being an anomaly there is none.</description>
		<content:encoded><![CDATA[<p>Although Progress calls ? the unknown value it is not a value at all. </p>
<p>/* tips_unknown.p */<br />
/* the unknown value is not a value at all */</p>
<p>def var a_unknown  as char no-undo.<br />
def var b_num_len  as int  no-undo.<br />
def var c_num_asc  as int  no-undo.<br />
def var d_str_sub  as char no-undo.</p>
<p>assign<br />
  a_unknown = ?<br />
  b_num_len = 123.</p>
<p>assign<br />
  b_num_len =    length(a_unknown).<br />
  c_num_asc =       asc(a_unknown).<br />
  d_str_sub = substring(a_unknown,1,1).</p>
<p>display<br />
    a_unknown label &#8220;unknown&#8221;<br />
    b_num_len label &#8220;length&#8221;<br />
    c_num_asc label &#8220;ASC value&#8221;<br />
    d_str_sub label &#8220;1st character&#8221;.</p>
<p>To prove this an integer in Progress is a 32 bit (4 bytes) signed numeric field where the number of unique values = 4,294,967,295. </p>
<p>See: <a href='http://oiswww.eumetsat.org/WEBOPS/eps-pg/Common/EPS-PG-A4EPSNativeFormatDataTypes.htm' rel='nofollow'>http://oiswww.eumetsat.org/WEBOPS/eps-pg/Common/EPS-PG-A4EPSNativeFormatDataTypes.htm</a></p>
<p>This program illustrates that every single bit combination for the Progress Integer data type is used for a valid number yet it still can be represented by the unknown value.</p>
<p>/* tips_int_range.p */<br />
/* count valid unique numbers that can be placed into an integer data type */</p>
<p>def var a_int_32 as int   no-undo.<br />
def var b_int_64 as int64 no-undo.</p>
<p>Evaluate_Integer:<br />
do while true.<br />
  a_int_32 = 0 no-error.<br />
  if error-status:error then<br />
    leave Evaluate_Integer.<br />
  else<br />
    b_int_64 = 1.                 /* count zero value */</p>
<p>  EI_Positive:<br />
  do while true:<br />
    a_int_32 = a_int_32 + 1 no-error.<br />
    if error-status:error then<br />
      leave EI_Positive.<br />
    else<br />
      b_int_64 = b_int_64 + 1.    /* count positive value */<br />
  end.</p>
<p>  a_int_32 = 0.  </p>
<p>  EI_Negative:<br />
  do while true:<br />
    a_int_32 = a_int_32 - 1 no-error.<br />
    if error-status:error then<br />
      leave EI_Negative.<br />
    else<br />
      b_int_64 = b_int_64 + 1.    /* count negative value */<br />
  end.<br />
end.</p>
<p>display b_int_64 format &#8220;-&gt;,&gt;&gt;&gt;,&gt;&gt;&gt;,&gt;&gt;9&#8243;<br />
                 label &#8220;Integer (32) Capacity&#8221;.</p>
<p>Therefore, the Progress unknown value is not a value but an attribute or state of the field.</p>
<p>How Progress &#8220;stores&#8221; this &#8220;unknown value&#8221; in a database or in memory is still a mystery.</p>
<p>As far as there being an anomaly there is none.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
