|
From: | Colin Ingram |
Subject: | Re: multiline strings and HERE documents |
Date: | Thu, 27 Oct 2005 14:00:39 -0500 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.7.2.0 |
John W. Eaton wrote:
On 27-Oct-2005, Colin Ingram wrote:| Does octave have support for HERE documents to handle multiline stings | in script files?If I understand your question correctly, then the answer is no. Maybe you could give us an example of what you are really trying to do, and someone could help you find a convenient way to do it.
sure..right now I am trying to print a long paragraph of text to a file. printf ("Here is an example where one wants to print a long paragraph of text where it would be convenient, although unnecessary, to use a HERE document so that I can avoid having to put all the text on to one line and avoid implicitly inserting '/n` for newlines. This makes code much more readable")
in the past I have wanted to write output files with several variables to output like
var A: number var B: another number var C: string and so on for several variables.I had no trouble doing it but it would have been much easier to formate useing a HERE document instead of putting the entire quote on one line within an fprintf(). So I thought I had read about HERE documents in the manual but I couldn't find it again so I must have been mistaken. Thanks though.
C
jwe ------------------------------------------------------------- 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 -------------------------------------------------------------
------------------------------------------------------------- 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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |