Bug in Indexed String handling?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in Indexed String handling?

George Hovey-2
I have encountered an apparent bug in the handling of Indexed Strings by NetRexxC under Windows 7.  The NetRexxC version is:

   "NetRexx portable processor, version NetRexx 3.02, build 172-20130625-1742"

It appears that a local Rexx Indexed String variable is not iniialized correctly upon entry to a method.  Specifically, the local variable retains its values from the previous entry to the method.

I have attempted to reproduce this behavior in a skeletonized version of my program without success.  So I can only demonstrate it with my original program.
Furtunately, this is a single class.

Briefly, the class, 'TreeX' processes the output from the DOS 'Tree' commmand, which is a graphical representation of a directory tree.  Method 'ParseFiles' handles the processing of the files in a single directory, and is called for each directory encountered.

ParseFiles defines two (local) Indexed Strings, TypesUC_IRx and Files_IRx.  The intent is that after ParseFiles has processed all files in the directory, TypesUC_IRx contains a list of the (uppercase) file types encountered; and Files_IRx contains a list of all file names encountered.

The problem is that on subsequent entry to ParseFiles, the results from the previous entry are retained in the two Indexed Strings.

If anyone would care to take a look at this I'll send a ZIP (160K).

-- George Hovey

--
"One can live magnificently in this world if one knows how to work and how to love."  --  Leo Tolstoy

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Bug in Indexed String handling?

billfen
Does the program work if you initialize the variables yourself?

Are the variables arrays or are they Rexx strings?  Are the variables being
initially defined within an if block?

Perhaps if you show us the method declaration and the first few
instructions which define or reference the two variables it would be
helpful.  How big is the ParseFiles method?  160K zip implies that the
class is several thousand lines - a bit much.


Original email:
-----------------
From: George Hovey [hidden email]
Date: Sat, 16 Nov 2013 14:42:57 -0500
To: [hidden email]
Subject: [Ibm-netrexx] Bug in Indexed String handling?


I have encountered an apparent bug in the handling of Indexed Strings by
NetRexxC under Windows 7.  The NetRexxC version is:

   "NetRexx portable processor, version NetRexx 3.02, build
172-20130625-1742"

It appears that a local Rexx Indexed String variable is not iniialized
correctly upon entry to a method.  Specifically, the local variable retains
its values from the previous entry to the method.

I have attempted to reproduce this behavior in a skeletonized version of my
program without success.  So I can only demonstrate it with my original
program.
Furtunately, this is a single class.

Briefly, the class, 'TreeX' processes the output from the DOS 'Tree'
commmand, which is a graphical representation of a directory tree.  Method
'ParseFiles' handles the processing of the files in a single directory, and
is called for each directory encountered.

ParseFiles defines two (local) Indexed Strings, TypesUC_IRx and Files_IRx.
The intent is that after ParseFiles has processed all files in the
directory, TypesUC_IRx contains a list of the (uppercase) file types
encountered; and Files_IRx contains a list of all file names encountered.

The problem is that on subsequent entry to ParseFiles, the results from the
previous entry are retained in the two Indexed Strings.

If anyone would care to take a look at this I'll send a ZIP (160K).

-- George Hovey

--
"One can live magnificently in this world if one knows how to work and how
to love."  --  Leo Tolstoy


--------------------------------------------------------------------
mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Bug in Indexed String handling?

George Hovey-2
Bill,
See below.


On Sat, Nov 16, 2013 at 6:12 PM, [hidden email] <[hidden email]> wrote:
Does the program work if you initialize the variables yourself?  See Note below.

Are the variables arrays or are they Rexx strings? Rexx Strings Are the variables being
initially defined within an if block? No

Perhaps if you show us the method declaration and the first few
instructions which define or reference the two variables it would be
helpful.

Method ParseFiles( ) Private Static
Say ">>Enter ParseFiles( )"
Files_IRx   = Rc_FilesNoDef                               -- _IRx means 'being used as Indexed String'
TypesUC_IRx = Rc_TypesUCNoDef


(Rc_FilesNoDef and Rc_TypesUCNoDef are constants.)
 
 How big is the ParseFiles method?  160K zip implies that the
class is several thousand lines - a bit much.  The class source is about 300 lines (less comments).  The ParseFiles method is about 100 lines.  A PDF (157K) of jEdit-formatted source is included.

Note: If I follow the two defs above with code nulling all elements of the two Indexed Strings, the program works as hoped for.  The ZIP includes correct and incorrect output files.


Original email:
-----------------
From: George Hovey [hidden email]
Date: Sat, 16 Nov 2013 14:42:57 -0500
To: [hidden email]
Subject: [Ibm-netrexx] Bug in Indexed String handling?


I have encountered an apparent bug in the handling of Indexed Strings by
NetRexxC under Windows 7.  The NetRexxC version is:

   "NetRexx portable processor, version NetRexx 3.02, build
172-20130625-1742"

It appears that a local Rexx Indexed String variable is not iniialized
correctly upon entry to a method.  Specifically, the local variable retains
its values from the previous entry to the method.

I have attempted to reproduce this behavior in a skeletonized version of my
program without success.  So I can only demonstrate it with my original
program.
Furtunately, this is a single class.

Briefly, the class, 'TreeX' processes the output from the DOS 'Tree'
commmand, which is a graphical representation of a directory tree.  Method
'ParseFiles' handles the processing of the files in a single directory, and
is called for each directory encountered.

ParseFiles defines two (local) Indexed Strings, TypesUC_IRx and Files_IRx.
The intent is that after ParseFiles has processed all files in the
directory, TypesUC_IRx contains a list of the (uppercase) file types
encountered; and Files_IRx contains a list of all file names encountered.

The problem is that on subsequent entry to ParseFiles, the results from the
previous entry are retained in the two Indexed Strings.

If anyone would care to take a look at this I'll send a ZIP (160K).

-- George Hovey

--
"One can live magnificently in this world if one knows how to work and how
to love."  --  Leo Tolstoy


--------------------------------------------------------------------
mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




--
"One can live magnificently in this world if one knows how to work and how to love."  --  Leo Tolstoy

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/