format string with many many quotation marks [message #54739] |
Thu, 05 July 2007 13:37 |
rchughes
Messages: 26 Registered: April 2006
|
Junior Member |
|
|
Dear All,
I'm trying to create a format string that looks like this: ( 5("'",
A0, "'", :, ", ") ) <- There are single quotation marks between the
first two double quotations.
I want to get something like this
a = SINDGEN(6)
print, a, FORMAT=val_fmt
to get:
'0', '1', '2', '3', '4', '5'
What i currently have for a format string is this:
val_fmt = '( ' + STRTRIM(STRING(cnt), 2) + $
'(' + "'" + ', A0, ' + "'" + ', :, ", ") )'
This one is wrong because it does not contain the double quotation
marks enclosing the single quotation marks. Can someone please
explain to me how I could do it or tips on how to use the BYTE method
to produce a string output like this.
Thanks,
Ryan.
|
|
|