Menu

#665 Space replaced with underscore in DISPLAY of USING screen field

GC 3.1
pending
5 - default
2020-07-26
2020-07-26
Edward Hart
No

If you display a screen with a USING field, then any spaces in the content of the USING field are replaced with spaces. This should only happen in an ACCEPT.

Reported by Maurizio Bongini, with reproducer, in [97dda9be21].

Related

Commit: [r5268]
Discussion: 97dda9be21
Discussion: SCREEN SECTION ....USING

Discussion

  • Edward Hart

    Edward Hart - 2020-07-26
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,3 @@
     If you display a screen with a USING field, then any spaces in the content of the USING field are replaced with spaces. This should only happen in an ACCEPT.
    
    -Reported by Maurizio Bongini in [97dda9be21].
    +Reported by Maurizio Bongini, with reproducer, in [97dda9be21].
    
    • status: accepted --> pending
     

    Related

    Discussion: 97dda9be21

  • Edward Hart

    Edward Hart - 2020-07-26

    Fixed in branches/gnucobol-3.x in [r3737]. Marked as pending, to be closed when a manual screen section testsuite entry is added.

     
  • Simon Sobisch

    Simon Sobisch - 2020-07-26

    Hm <= on a space character looks suspicious, shouldn't this be something like:

    -           } else if (*p <= ' ' && stmt == ACCEPT_STATEMENT) {
    +           } else if (stmt == ACCEPT_STATEMENT && (isspace (*p) || !isprint(*p))) {
    

    (this may / may not break some locales though) ? and what should be done in the DISPLAY case for non-printable characters? Maybe use a raw output for those?

     

Log in to post a comment.