warnings which don't help user to undesrtand where the problem is
Sergei Steshenko
sergstesh at yahoo.com
Mon Jan 5 10:57:55 CST 2009
--- On Mon, 1/5/09, bugs_bunny <isgoed at hotmail.com> wrote:
> From: bugs_bunny <isgoed at hotmail.com>
> Subject: Re: warnings which don't help user to undesrtand where the problem is
> To: bug-octave at octave.org
> Date: Monday, January 5, 2009, 5:43 AM
> I just found this bug on google and since you posted it only
> 2 days ago I'd
> like to ask you how you'd solved it. I still get
> "warning: implicit
> conversion from scalar to string" when I use the
> functions:
>
> [charc, count] = fscanf (FID, "%c", 1);
> [header, count] = fscanf (FID, "%s\n", 1);
>
> I don't see any other way to write the syntax. The
> program works though, it
> is only annoying.
>
> I use GNU Octave, version 2.1.53
> (powerpc-apple-darwin7.2.0). I checked for
> updates, but there were no packages to install.
>
>
> Sergei Steshenko-2 wrote:
> >
> > Both:
> >
> > sprintf("%s", 1000000000000)
> > warning: range error for conversion to character value
> > warning: implicit conversion from scalar to string
> >
> > --Sergei.
> >
>
> --
> View this message in context:
> http://www.nabble.com/warnings-which-don%27t-help-user-to-undesrtand-where-the-problem-is-tp21271788p21291235.html
> Sent from the Octave - Bugs mailing list archive at
> Nabble.com.
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave at octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
The fact that your program works does not mean it is correct.
In my case the warnings indicated a problem in my code, i.e. the warnings
were justified, they just didn't help much to clearly identify the exact
location of the problems in my code.
I guess the data you read with 'fscanf' is not compatible with the
format you specified in 'fscanf' call, but to verify this guess you need
to publish data in the file pointed to by FID.
--Sergei.
More information about the Bug-octave
mailing list