#54 UNSTRING bug with ALL clause with delimiter size > 1 (since 1.x, not yet solved in 2.x)

GC 1.1
closed
None
8
2015-01-27
2013-12-20
No

Reported by Luke Smith, his sample is attached.

Current result:

From: Salt and Pepper                    Spoon and Fork                     Cup and Napkin                     Flower and Vase                    
on overflow
To: Salt and Pepper                         
Pointer:   54
on overflow
To:                                         
Pointer:   86
on overflow
To:                                         
Pointer:  124
not on overflow
To:                                         
Pointer:  156

Should be (run the source with another vendor):

From: Salt and Pepper                    Spoon and Fork                     Cup and Napkin                     Flower and Vase
on overflow
To: Salt and Pepper
Pointer:   36
on overflow
To: Spoon and Fork
Pointer:   70
on overflow
To:  Cup and Napkin
Pointer:  105
not on overflow
To:  Flower and Vase
Pointer:  141
1 Attachments

Related

Discussion: Opencobol-1.1 Install Tests Suite Failures..

Discussion

  • Luke Smith

    Luke Smith - 2013-12-22

    Simon offers this as a work around:

    1. Put these before the first unstring command.

         inspect from-x replacing all '  '    by x'0000'
         inspect from-x replacing all x'0020' by x'0000'
      
    2. Change the unstring to this.

          delimited by all x'00'
      

    This will give the desired results. And even gets rid of the leading space on tokens after an odd number of spaces (the second inspect does this).

     
  • Simon Sobisch

    Simon Sobisch - 2013-12-23
    • assigned_to: Luke Smith
     
  • Luke Smith

    Luke Smith - 2013-12-27

    Fix checked in for 2.0. Committed revision 140. Includes a test in the run_misc.at test suite. Please close this.

     
    Last edit: Luke Smith 2013-12-30
  • Simon Sobisch

    Simon Sobisch - 2014-01-10
    • status: open --> closed
     
  • Simon Sobisch

    Simon Sobisch - 2014-11-24
    • Group: unclassified --> GC 2.0
     
  • Simon Sobisch

    Simon Sobisch - 2015-01-27

    Fixed both in 1.1 and 2.x of GnuCOBOL.

     
  • Simon Sobisch

    Simon Sobisch - 2015-01-27
    • Group: GC 2.0 --> GC 1.1
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks