From: <cde...@us...> - 2011-10-07 12:45:37
|
Revision: 8708 http://octave.svn.sourceforge.net/octave/?rev=8708&view=rev Author: cdemills Date: 2011-10-07 12:45:26 +0000 (Fri, 07 Oct 2011) Log Message: ----------- Add a new parameter, 'locales', to specify in which locales to interpret the data Modified Paths: -------------- trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m Modified: trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m =================================================================== --- trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m 2011-10-07 08:04:32 UTC (rev 8707) +++ trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m 2011-10-07 12:45:26 UTC (rev 8708) @@ -90,6 +90,7 @@ %# default values seeked = []; trigger =[]; unquot = true; sep = "\t,"; cmt_lines = []; +locales = "C"; if (length(varargin) > 0) indi = 1; @@ -141,6 +142,9 @@ case 'sep', sep = varargin{indi + 1}; varargin(indi:indi+1) = []; + case 'locales' + locales = varargin{indi + 1}; + varargin(indi:indi+1) = []; otherwise %# FIXME: just skip it for now disp (sprintf ("Ignoring unkown argument %s", varargin{indi})); indi = indi + 1; @@ -251,7 +255,7 @@ continue; endif %# try to convert to float - the_line = cellfun (@(x) sscanf (x, "%f", ""), dummy, \ + the_line = cellfun (@(x) sscanf (x, "%f", locales), dummy, \ 'UniformOutput', false); for indk = (1:size (the_line, 2)) if (isempty (the_line{indk}) || any (size (the_line{indk}) > 1)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |