bugPSPP - Bugs: bug #15702, DO REPEAT command should support...

 
 

bug #15702: DO REPEAT command should support multiple variable lists.

Submitter:  John Darrington <jmd>
Submitted:  Sat 11 Feb 2006 12:59:48 AM UTC
   
 
Category:  Syntax Parser Severity:  1 - Wishlist
Status:  Fixed Assigned to:  blp
Open/Closed:  Closed Release:  Before 0.6.0
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 03 Dec 2006 10:17:43 PM UTC, comment #5: 


>I can't see any problems with this patch.


Thanks, I checked it in.

>One thing that occured to be with DO REPEAT, is that we don't seem
>to have any tests with nested DO REPEAT blocks. Perhaps we should
>add some?


SPSS doesn't allow DO REPEAT to nest (as I learned somewhat recently).  Perhaps we should just disallow it as well.  What do you think?

Ben Pfaff <blp>
Group administrator
Sun 03 Dec 2006 09:50:32 PM UTC, comment #4: 

I can't see any problems with this patch. 

One thing that occured to be with DO REPEAT, is that we don't seem to have any tests with nested DO REPEAT blocks.  Perhaps we should add some?

John Darrington <jmd>
Group administrator
Sun 03 Dec 2006 08:03:23 PM UTC, comment #3: 

The attached patch fixes the problem mentioned in comment #2.  It also does a bit of cleanup elsewhere.  It is also useful preparation for implementing the INSERT command, in that it separates whether a getl_interface interacts with a user from whether the lines it reads should be interpreted as interactive or batch syntax.

(file #11435)

Ben Pfaff <blp>
Group administrator
Sun 03 Dec 2006 12:52:23 AM UTC, comment #2: 

This bug was seemingly fixed long ago, because there is a test in the source tree that checks that a command similar to the example below works.  The example below has a couple of problems: "h" has
one more substitution than "x", which is not allowed, and "t" is undeclared (should probably be "x").

However, a new bug was introduced by the recent change that broke up the getl code.  This code adds a getl_interface to the repeat code but doesn't supply ->name or ->location member functions, thus the following small change to the example dumps core because it tries to issue an error message inside DO REPEAT (due to "t" not being a valid variable name):

INPUT PROGRAM.
DO REPEAT h = h0 h1 h2 h3 / x = 0 1 2 3 .
COMPUTE h = t.
END REPEAT.
END INP PRO.

I have a patch almost ready that fixes this and does a good bit of general cleanup to DO REPEAT.

Ben Pfaff <blp>
Group administrator
Sat 11 Feb 2006 01:07:56 AM UTC, comment #1: 

Oddly enough, I just rewrote a lot of DO REPEAT as part of the getl & friends cleanup.  I'll make sure that this bug gets fixed too and pass it along when the rest of that is ready.

Ben Pfaff <blp>
Group administrator
Sat 11 Feb 2006 12:59:48 AM UTC, original submission:  

The DO REPEAT command should be able to take an arbitrary number of  variables.  Such as:

DO REPEAT  h = h0 h1 h1 h2 h3 / x = 0 1 2 3 .
COMPUTE h = t.
END REPEAT.


John Darrington <jmd>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #11435:  bug-15702.patch added by blp (60KiB - text/x-patch - patch with fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by blp (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2006-12-10 blp Open/ClosedOpen Closed
    2006-12-03 blp StatusNone Fixed
    2006-12-03 blp Attached File- Added bug-15702.patch, #11435
    2006-07-31 blp ReleaseNone Before 0.6.0
    2006-02-11 blp Assigned toNone blp

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code