Ever had to enter a lot of numbers into an array in an AIPS script and run out of room (like in this post)? Trying to figure out the mysteries of plcolor without typing 5 million numbers? In your time of need, the handy tilde will help you out. See below the fold for more details.
The popsym help file (type help popsym
to access) gives you this handy tidbit of information on the tilde
A(i) ~ 1,2,3 Store values in A(i),A(i+1)... (change only as many as on RHS)
Now here's an example,
filename = '10208722.UVF','10208724.UVF','10208726.UVF','10208727.UVF'
filename(5) ~ '10208733.UVF','10303423.UVF','10303424.UVF','10303461.UVF'
Tah-Dah!! That's all there really is to it. Use the tilde, Luke -- your fingers will thank you.
Thursday, October 4, 2007
Your friend, the tilde
Posted by amanda at 9:03 PM 0 comments
Labels: scripting, tips n' tricks
Subscribe to:
Posts (Atom)