bugPSPP - Bugs: bug #30705, Decimal point and locale bugs in...

 
 

bug #30705: Decimal point and locale bugs in data parsing

Submitted by:  Ben Pfaff <blp>
Submitted on:  Sun 08 Aug 2010 10:28:36 PM UTC  
 
Category:  Syntax Parser Severity:  5 - Average
Status:  Invalid Assigned to:  None
Open/Closed:  Closed Release:  Before 0.8.0
Effort:  0.00

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 27 Nov 2012 05:44:13 AM UTC, comment #1:

I think that this is behaving as it should, even if the behavior is confusing.

In pt_BR.utf8, the default decimal point is a comma. That explains the errors for 10.3 and 10.2.

However, the DATA LIST default freefield delimiter is always a comma, regardless of whether the decimal point is a dot or a comma. This means that 10,3 10,2 is four fields, not two. To get two fields, you need quotation marks: "10,3" "10,2".

I don't think there's a bug here, but if SPSS behaves differently then please explain what it does and reopen the bug.

Ben Pfaff <blp>
Project Administrator
Sun 08 Aug 2010 10:28:36 PM UTC, original submission:

From: Michel Boaventura <michel@michelboaventura.com>

> The bellow syntax, from npar-sign, is behaving in a strange way.
>
> For instance, if I run: pspp syntax.sps, I get:
>
> test.sps:10: aviso: (colunas 1-0, F campo)Número seguido por
> lixo. (warning,number followed by garbage)
> test.sps:10: aviso: (colunas 6-5, F campo)Número seguido por
> lixo. (warning,number followed by garbage)
>
> The default locale on my GNU/Linux is pt_BR.utf8. If I change it to
> only pt_BR or remove the
> "set format = F9.3", everything works fine.
>
> syntax:
>
> set format = F9.3.
>
> data list notable list /age * height rank *.
> begin data.
> 10 12 11
> 12 13 13
> 13 14 12
> 12 12 10
> 9 9 10
> 10.3 10.2 12
> end data.


From: John Darrington <john@darrington.wattle.id.au>

> I can confirm similar behaviour. However if I add "SET DECIMAL=DOT." to
> the topy of the syntex, then i works ok.
> However, when I change the "."s to ","s in the BEGIN DATA block, the numbers
> don't get parsed, contrary to what I would have expected.

Ben Pfaff <blp>
Project Administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Submitted the item)
  • -email is unavailable- added by blp (reporter)
  •  

    Do you think this task is very important?
    If so, you can 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
    2012-11-27 blp StatusNone => Invalid
        Open/ClosedOpen => Closed
    2011-05-14 blp ReleaseNone => Before 0.8.0
    2010-08-08 blp Carbon-Copy- => Added -email is unavailable-

    Back to the top


    Powered by Savane 3.3