PDA

View Full Version : fprint: how to print "


biorhythm
12-10-2006, 11:01 PM
hello all,

i'm trying to use fprint to print a line of text with one of these --> " <-- charicters to a file

the line i'm trying to print is this -- Display "test.tiff" "file" rgb"

i have attempted to print it by doing this

fprint $fileId (""Display" + " " + ($ribName) + ".tiff"" + " " + ($file) + " " ($rgb)) ;

but as i'm sure you can guess, syntax error!

any help or ideas would be greatly appricated

thanks

julien

mrgoodbyte
12-10-2006, 11:10 PM
You'll need to escape these characters, prohibiting from being interpreted as special characters. Try this:
fprint $fileId ("Display " + $ribName + " \"test.tiff\"" + " \"" + $file + "\" \"" + $rgb + "\"") ;

-Ronald

faultymoose
12-10-2006, 11:11 PM
You just need to put a slash before the quote.

For example, if you wanted to put the following in a string:

He said "Hello".

You would use:

$string = "He said \"Hello\".";


EDIT: D'OH! Too slow!

biorhythm
12-10-2006, 11:34 PM
cool, thanks guys:)

CGTalk Moderation
12-10-2006, 11:34 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.