products/Sources/formale Sprachen/Isabelle/Tools/jEdit/dist/doc/users-guide image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: dialog-macro-intro.html   Sprache: HTML

Original von: Isabelle©

 products/Sources/formale Sprachen/Isabelle/Tools/jEdit/dist/doc/users-guide/dialog-macro-intro.html


<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Use of the Macro</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="jEdit 5.6 User's Guide"><link rel="up" href="dialog-macro.html" title="Chapter 14. A Dialog-Based Macro"><link rel="prev" href="dialog-macro.html" title="Chapter 14. A Dialog-Based Macro"><link rel="next" href="add-prefix-and-suffix.html" title="Listing of the Macro"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Use of the Macro</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dialog-macro.html">Prev</a> </td><th width="60%" align="center">Chapter 14. A Dialog-Based Macro</th><td width="20%" align="right"> <a accesskey="n" href="add-prefix-and-suffix.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dialog-macro-intro"></a>Use of the Macro</h2></div></div></div><p>Our new example adds prefix and suffix text to a series of
        selected lines. This macro can be used to reduce typing for a series of
        text items that must be preceded and following by identical text. In
        Java, for example, if we are interested in making a series of calls to
        <code class="function">StringBuffer.append()</code> to construct a lengthy,
        formatted string, we could type the parameter for each call on
        successive lines as follows:</p><pre class="screen">profileString_1
secretThing.toString()
name
address
addressSupp
city
<span class="quote">“<span class="quote">state/province</span>”</span>
country</pre><p>Our macro would ask for input for the common <span class="quote">“<span class="quote">prefix</span>”</span>
        and <span class="quote">“<span class="quote">suffix</span>”</span> to be applied to each line; in this case, the
        prefix is <strong class="userinput"><code>ourStringBuffer.append(</code></strong> and the suffix
        is <strong class="userinput"><code>);</code></strong>. After selecting these lines and running
        the macro, the resulting text would look like this:</p><pre class="screen">ourStringBuffer.append(profileString_1);
ourStringBuffer.append(secretThing.toString());
ourStringBuffer.append(name);
ourStringBuffer.append(address);
ourStringBuffer.append(addressSupp);
ourStringBuffer.append(city);
ourStringBuffer.append(<span class="quote">“<span class="quote">state/province</span>”</span>);
ourStringBuffer.append(country);</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="dialog-macro.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="dialog-macro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="add-prefix-and-suffix.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 14. A Dialog-Based Macro </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Listing of the Macro</td></tr></table></div></body></html>

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤





Download des
Quellennavigators
Download des
sprechenden Kalenders

in der Quellcodebibliothek suchen




Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.


Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff