help-octave
[Top][All Lists]
Advanced

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

Re: Problem with single quotes


From: James Sherman Jr.
Subject: Re: Problem with single quotes
Date: Thu, 2 Oct 2008 12:29:00 -0400


> | >  2) The escape code for ' inside a single quoted string is ''.
> | >
> | > So, the following should work:
> | >  fprintf ('''')
> |
> | I did not know that. That statement prints a double quote in Octave.
>
> No, it should print a single ' character, same as Matlab.

I can only report what I see. I've tried it on Octave 3.0.2 (OS X) and
Octave 3.0.0 (Ubuntu Hardy). Both give me a double quote.

> | I'll give it a shot in Matlab and see what happens.

A colleague just tried it on Matlab and got a double quote as well.

I just tried this in matlab version 7.5.0.342 and got a single quote.

Just to precise there are 4 single ' characters inside the brackets in
fprintf('''') statement.

James


reply via email to

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