;Set the system path, in a relatively machine-independent manner. ;input ; p - array of string path components. Each must be a single path component ; but may start with a + or be an expand_path macro (like ) ; if you want '/stuff/here:+/stuff/there', pass ['/stuff/here','+/stuff/there'] ;no output, no return, but sets the !PATH system variable ; ;Notes: This program cleans up each path by converting folder separators (like '/') to ; the correct local form, and removing consecutive folder separators. It then ; combines all of them into a single string, calls expand_path() with it, ; then sets !PATH with the result. pro set_path,p for i=0,n_elements(p)-1 do p[i]=normalize_path(p[i]) ;Combine them all into one path specifier according to local convention s=strjoin(p,path_sep(/search_path)) ;set the system path DEFSYSV, '!PATH', expand_path(s) end