help-octave
[Top][All Lists]
Advanced

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

Re: printf and fprintf for "%"


From: Jun Ohta
Subject: Re: printf and fprintf for "%"
Date: Mon, 30 May 2005 11:50:48 +0900

Thank you for all of your responses. Those are so helpful. Jun

Keith Goodman wrote:
>On 5/29/05, Jun Ohta <address@hidden> wrote:
>> >> a = "%"
>> a = %
>> >> printf(a)
>> error: fprintf: invalid format specified
>> error: evaluating assignment expression near line 35, column 12
>> error: evaluating if command near line 34, column 3
>> error: called from `printf' in file
>> `/usr/local/share/octave/2.1.50/m/io/printf.m'
>> >>
>
>You forgot to tell printf how to format the string:
>
>>> a="%"
>a = %
>>> printf("%s",a)
>%>> printf("%s\n",a)
>%

Jun Ohta, address@hidden
Homepage:
in Japanese: http://www.cc.okayama-u.ac.jp/~jo25/
in English: http://www.cc.okayama-u.ac.jp/~jo25/eng_index.htm
IMAC: http://www.metabo-info.org/



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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