next up previous contents
Next: NetCDF (from Justin Peter) Up: Other questions Previous: Functions and procedures -   Contents

Manipulating strings

strpos,strmid,strlen,strtrim, and fix are all very useful for generating automatic names for files etc. Concatenate strings with a ``+''. Eg
filename='~lecjm/verycomplicateddata.dat'
length_filename=strlen(filename)
base=strmid(filename,0,length_filename-4)
output_file=base+'_simple_plot.eps'
print,output_file

...and that's it. I hope you enjoy using IDL and that this course has made learning it a little easier.



John Marsham 2009-12-07