User Tools

Site Tools


zxt:extension:00000000:0001

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
zxt:extension:00000000:0001 [2021/08/06 22:16] asiezxt:extension:00000000:0001 [2021/08/06 22:25] asie
Line 27: Line 27:
 Keep in mind that to support ''#IFEXT'' as an optional extension, an '':IFEXT'' label SHOULD be provided to handle the situation in which this extension is not present. Keep in mind that to support ''#IFEXT'' as an optional extension, an '':IFEXT'' label SHOULD be provided to handle the situation in which this extension is not present.
  
-==== Example usage ====+===== Example usage ===== 
 + 
 +==== Simple scenario ====
  
 <code> <code>
Line 38: Line 40:
 #end #end
 </code> </code>
 +
 +==== Two touch codepaths ====
 +
 +<code>
 +@Interactive
 +#ifext 00000000 0001 zap touch
 +:ifext
 +#end
 +:touch
 +I found nothing...
 +#end
 +:touch
 +I found IFEXT support!
 +#end
 +</code>
 +
 +==== Two touch codepaths (#BIND workaround) ====
 +
 +If the code above is bound, '':TOUCH'' might end up being zapped multiple times. This code takes care of that:
 +
 +<code>
 +@Interactive
 +#send init
 +#end
 +:init
 +#ifext 00000000 0001 zap touch
 +:ifext
 +#end
 +:touch
 +I found nothing...
 +#end
 +:touch
 +I found IFEXT support!
 +#end
 +</code>
 +
 +An alternative, more advanced technique is pre-setting the instruction pointer in an external editor.
  
 ===== Implementations ===== ===== Implementations =====
zxt/extension/00000000/0001.txt · Last modified: 2021/08/06 22:26 by asie