octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: locale support patch for [fs]sscanf function


From: John W. Eaton
Subject: Re: locale support patch for [fs]sscanf function
Date: Thu, 19 Jan 2012 13:26:05 -0500

On 19-Jan-2012, CdeMills wrote:

| The idea is to be able to transform the warning into an error to catch it
| during the 'make check' phase. To this end, an Id is required. I agree that
| "undefined return value" is not very appropriate, but other existing Id have
| lesser relevance with the case. Could you suggest or create something
| appropriate ?

Please, let's just remove this change and then discuss what is the
right thing to do.

For example, does the locale affect the way scanf works for anything
other than "," in numbers?  If not, then maybe we could handle this in
some other way.

Should setting the locale only be possible using the optional argument
to scanf, or should it be possible to set this (semi) globally?  For
example, imagine a script with many calls to scanf.  The way it is
now, I would have to change each of those calls to use a different
locale.  It seems to me that it would be convenient to be able to set
the prevailing locale in one place so that scripts with many calls to
scanf could change behavior without having to be modified.

So I think it is worth putting some more thought into this before
committing a change.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]