Re: Possibly O/T: printing IDL code in colour -> CAN DO!!! [message #27149] |
Thu, 11 October 2001 03:25 |
Martin Downing
Messages: 136 Registered: September 1998
|
Senior Member |
|
|
Hi Andrew,
just had a look at your code "pinta2ps.pro" the string manipulation:
--------------------------
; A2PS deletes '\' characters from the title string, so we have
; to duplicate these
substrings = STRSPLIT(file,'\',/EXTRACT)
substrings(0:N_ELEMENTS(substrings)-2) =
substrings(0:N_ELEMENTS(substrings)-2) + '\\'
file = substrings(0)
FOR i = 1,N_ELEMENTS(substrings)-1 DO BEGIN
file = file + substrings(i)
END
-----------------------------
can be achieved as:
file = STRJOIN(STRSPLIT(file, "\", /EXTRACT), "\\" )
for once I learnt that from the manual!
I've yet to try a2ps, but thanks for sharing this method with us
Martin
|
|
|