! This is a sample text file to test macro expansion by NIME ! WM Fawley (fawley@lbl.gov) This is the first line of many. This is the second line. This is a third line. ! note that all material beyond and including an exclamation point are ! treated as comments and do not get propagated when the file is expanded ! Also, note that blank lines *not* in macros do NOT get propagated to the ! expanded text; however, blank lines in macros DO get propagated. Weather Predictions: !*** this is a rather silly example of macro use \wpred %date=10/16/2000 %weather=cloudy \wpred %date=11/01/2001 %planet=Krypton \RF %name=RF-AA %freq=3.e9 %voltage=2.e6 %length=10.35 \wpred %date=Sunday %planet=Venus %weather=sunny !.. \costf %currency=dollars \wpred %weather=thunderstorms %planet=Jupiter !..begin macro definitions: \def wpred ! this is a comment on the def line of a macro The predicted weather for %date(today) is %weather(rain) . ! macro body comment The planet %planet(Mars) will rise on the following date. \enddef \def costf Muon colliders may be costly beasts. Cost could be minimized if built at %location(India) and paid for in %currency(Pounds) . %location is also thought to be quite a pretty location. \enddef \def RF RF section %name length = %length(1.0) voltage = %voltage(0.0) type(2) %freq 0. 0. 0. 0. 0. 0. 0. 0. 1 0. 0. \enddef !..end macro definitions !..the following shows a macro expansion after macro definitions \RF %name='Last-RF' %freq=3.7e9 %voltage=1.e6 this is the END! ! note that neither exclamation point appears after expansion