comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Possibly O/T: printing IDL code in colour -> CAN DO!!!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Possibly O/T: printing IDL code in colour -> CAN DO!!! [message #27149] Thu, 11 October 2001 03:25
Martin Downing is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Using MIN on arrays : Exorcising loops?
Next Topic: Octals

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:35:19 PDT 2025

Total time taken to generate the page: 0.00450 seconds