bugKawa - Bugs: bug #40122, Extra whitespaces when displaying...

 
 

bug #40122: Extra whitespaces when displaying numbers

Submitted by:  Matthieu Vachon <maoueh>
Submitted on:  Fri 27 Sep 2013 01:32:37 AM UTC  
 
Category: Scheme languageSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 27 Sep 2013 07:28:54 AM UTC, comment #1:

It's an intended feature. You can argue whether it's a good idea, and there are certainly cases where things get more complicated, but at least for now the feature stays.

The idea is the display is meant to print out numbers so they are human-readable - and write prints them out so they are computer-readable. Neither of which is the case if (display 2) (display 3) produces "23". You can't meaningfully create 23 by concatenating 2 and 3. Note the extra space is only added between numbers (or other "atoms", like booleans and symbols or characters when using write. If you don't want an extra space, write a string between the numbers - even an empty string will do:
(display 2) (display "") (display 3) ==> "23"

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Fri 27 Sep 2013 01:32:37 AM UTC, original submission:

Consider the following snippet:

From my understanding (and it was the case back in the days 1.7.91), this code should print "[123]" in the console. However, it displays "[1 2 3]" instead.

If I'm wrong, just close the issue. I already changed my codebase to not rely on the `display` function. Maybe it's a feature but strings are displayed without spaces, so I think it should be the same with numbers.

I have a test case for this, just waiting to get the bug id. I'm going to attach it right after submitting it.

Regards,
Matt

Matthieu Vachon <maoueh>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29238:  feature-digit-extra-space-testcase.patch added by maoueh (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Posted a comment)
  • -unavailable- added by maoueh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 27 Sep 2013 07:28:54 AM UTCbothnerStatusNone=>Wont Fix
      Assigned toNone=>bothner
      Open/ClosedOpen=>Closed
    Fri 27 Sep 2013 01:36:04 AM UTCmaouehAttached File-=>Added feature-digit-extra-space-testcase.patch, #29238

    Back to the top


    Powered by Savane 3.1-cleanup1