Using GML tags within macros


Question

I have a macro that sets symbols. The text in the symbols contains GML tags, but the output is not what I expect. Why?

Answer

  You have to be careful to activate the GML tag processing only when
  you really want those tags to be processed, and turn it off when
  you want to include the tags without processing them.

  Let's look at the example below.  In this example we see that the
  user has the right idea by using .gs tag off when defining the
  macros because he does not want the GML tags to process while the
  macro is being defined.  After the definition he uses .gs tag on
  to restore GML tag process when he invokes the macros.  This
  works great for the first part of the TESTIMBED macro where the
  definition list tags are processed when the TESTIMBED macro is
  executed.

  But this example has a problem.  In the second part of TESTIMBED,
  the user is doing something a little more complicated.  He is
  setting a symbol and using the symbol within the macro.  He
  needs to have .gs tag off in effect for setting the symbol,
  but .gs tag on in effect for using the symbol.

  .SA
  .SU OFF
  .GS TAG OFF
  .DC CW OFF
  .DM I01 OFF
  .DM I01() /Hier kommt ein Imbed
  .DM I01() /.sk
  .DM I01() /.EM .TESTIMBED
  .SA
  .SU OFF
  .GS TAG OFF
  .DC CW OFF
  .DM TESTIMBED OFF
  .DM TESTIMBED() /:dl tsize=20
  .DM TESTIMBED() /:dt.Hugo
  .DM TESTIMBED() /:dd.Tarzan lebt im Urwald
  .DM TESTIMBED() /:edl.
  .DM TESTIMBED() /.sk
  .DM TESTIMBED() /.'SE AsF30'Und schon wieder gibt es ein Problem mit den GML-Ta
  .DM TESTIMBED() /.'SE AsF31'gs :hp1.Herr Weik :ehp1.'
  .DM TESTIMBED() /&AsF30.&AsF31.
  .DM TESTIMBED() /laesst uns nicht in Ruhe....
  .RE
  .DM I01() /.sk
  .DM I01() /Und hier ist es zu Ende.
  .RE
  .GS TAG ON
  .EM .I01

  The solution is a to add two lines to the macro so that the part that
  sets and uses the symbols now looks like this:

  .DM TESTIMBED() /.'SE AsF30'Und schon wieder gibt es ein Problem mit den GML-Ta
  .DM TESTIMBED() /.gs tag off
  .DM TESTIMBED() /.'SE AsF31'gs :hp1.Herr Weik :ehp1.'
  .DM TESTIMBED() /.gs tag on
  .DM TESTIMBED() /&AsF30.&AsF31.
  .DM TESTIMBED() /laesst uns nicht in Ruhe....

Last updated: 95/08/02 18:04:04

 

Previous Contents