Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I just skimmed the thread but just in case this detail was missed while pursuing inconsistencies between stored values and displayed values, a numeric variable of type double is assigned a display format that will not necessarily show the full decimal representation of the stored number (within the limits of the storage type precision). Using the consistent example in #5:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double x
    82.2434248291
    end
    
    describe
    list
    
    format %9.0g x
    list
    
    format %14.0g x
    list
    and the results
    Code:
    . describe
    
    Contains data
      obs:             1                          
     vars:             1                          
     size:             8                          
    ------------------------------------------------------------------------------------------------------------------------------------
                  storage   display    value
    variable name   type    format     label      variable label
    ------------------------------------------------------------------------------------------------------------------------------------
    x               double  %10.0g                
    ------------------------------------------------------------------------------------------------------------------------------------
    Sorted by: 
         Note: Dataset has changed since last saved.
    
    . list
    
         +-----------+
         |         x |
         |-----------|
      1. | 82.243425 |
         +-----------+
    
    . 
    . format %9.0g x
    
    . list
    
         +----------+
         |        x |
         |----------|
      1. | 82.24342 |
         +----------+
    
    . 
    . format %14.0g x
    
    . list
    
         +---------------+
         |             x |
         |---------------|
      1. | 82.2434248291 |
         +---------------+
    Note that the data editor/browser will use the display format so the number displayed will be the same as the one that is shown in the top field.

    Comment


    • #17
      Robert -

      You may have skimmed too rapidly. Nick and I see the problem stated in for example post #5, and this is not amenable to your solution.

      I still have an issue that the figure is displayed in the data editor as 82.24342. but when I point the cusor to this cell the figure is fully displayed on the tool bar on top a 82.2434248291. I want the figure to be displayed in full in both the data editor and tool bar with commas 822,434,248,291.

      Comment


      • #18
        Indeed, I did not read the last sentence you quoted. Very puzzling request!

        Comment

        Working...
        X