<DIV>
<DIV>Dear Sir</DIV>
<DIV>I have three questions about macros in the SAC:</DIV>
<DIV>(1)In the example, particle motion plots are produced for five different two second time windows on the same data file: <FONT color="#ff0000">READ ABC <BR>SETBB TIME1 0 <BR>DO TIME2 FROM 2 TO 10 BY 2 <BR>XLIM %TIME1 $TIME2 <BR>TITLE 'Particle Motion from %TIME1 to $TIME2$' <BR>PLOTPM <BR>SETBB TIME1 $TIME2 <BR>ENDDO</FONT></DIV>
<DIV><STRONG>(Why is a dollar sign needed after <FONT color="#ff0000">TIME2</FONT> in the <FONT color="#ff0000">TITLE</FONT> command?)</STRONG></DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV>(2)In the example, we need to calculate the tangent of an angle that has already been stored in the blackboard in degrees:</DIV>
<DIV><FONT color="#ff0000">u: GETBB ANGLE <BR>s: ANGLE = 45.0 <BR>u: SETBB VALUE (TAN (DIVIDE (MULTIPLY (PI) %ANGLE%) 180.)) <BR>s: ==&gt; SETBB VALUE 1.00000<BR></FONT>We can rework the above example into a more natural form by intermixing regular (prefix) and embedded arithmetic functions: <FONT color="#ff0000"></FONT></DIV>
<P>u: SETBB VALUE (TAN ((PI) * %ANGLE / 180. )) <BR>s: ==&gt; SETBB VALUE 1.00000<BR></P>
<P><STRONG>(Why is the percent sign needed after <FONT color="#ff0000">ANGLE</FONT> in the first example and is not needed in the second example?)</STRONG></P>
<P>(3)The next example uses the <FONT color="#ff0000">SUBSTRING</FONT> function to extract the month of the event and store it into a blackboard variable. </P>
<P><FONT color="#ff0000">{u:} FUNCGEN SEISMOGRAM <BR>{u:} SETBB MONTH (SUBSTRING 1 3 '&amp;1,KZDATE&amp;') <BR>{s:} ==&gt; SETBB MONTH MAR<BR></FONT><STRONG>(Why are the quotes needed around the header variable <FONT color="#ff0000">KZDATE</FONT>?)</STRONG></P>
<P>I am eager to hear from you! Thanks!</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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