8/18/2023 0 Comments Text expander linux![]() ![]() If newbracket is specified, it becomes the newīracket, and is returned. expanderName lb ? newbracket? Returns the current value of the left macro expansion bracket this isįor use as or within a macro, when the bracket needs to be included in Items will be used as the left and right macro expansion bracket If brackets is given, it must be a list of two strings the expanderName expand string ? brackets? Expands the input string, replacing embedded macros with theirĮxpanded values, and returns the expanded string. If specified, newEvalCmd will be saved forįuture use and then returned it must be a Tcl command expecting oneĪdditional argument: the macro to evaluate. nothing The macro expands to the empty string, and is effectively ignored.ĮxpanderName evalcmd ? newEvalCmd? Returns the current evaluation command, which defaults to macro The macro expands to itself that is, it is passed along to the output error The macro expands into a detailed error message, and expansionĬontinues. fail The error propagates normally and can be caught or ignored by theĪpplication. The value determines what the expander does if anĮrror is detected during expansion of a macro. Macro, error, or fail the default value isįail. expanderName errmode newErrmode Sets the macro expansion error mode to one of nothing, Varname this allows the variable to be passed to commands like expanderName cvar varname Retrieves the internal variable name of context variable expanderName cset varname value Sets variable varname to value in the current context. TheĬontext must be popped by cpop before expansion ends or anĮrror results. expanderName cpush cname Pushes a context named cname onto the context stack. This is similar to a combination of cpopįollowed by cpush, except that internal state (brackets) is expanderName ctopandclear Returns the output currently captured in the topmost context andĬlears that buffer. The context must be named cname, or anĮrror results. expanderName cpop cname Pops a context from the context stack, returning all accumulated expanderName cname Returns the name of the current context. expanderName cis cname Determines whether or not the name of the current context isĬname. expanderName cget varname Retrieves the value of variable varname, defined in the currentĬontext. Should rarely be used by macros or application code. The following commands are possible for expander objects: expanderName cappend text Appends a string to the output in the current context. ![]() Option and the args determine the exact behavior of the The command has the following general form: expanderName option ? arg arg. Not fully qualified it is interpreted as relative to the current ::textutil::expander expanderName The command creates a new expander object with an associated TclĬommand whose name is expanderName. The methods for the expander objects created by this command. The rest of the section is taken by a description of The textutil::expander package provides only one command,ĭescribed below. Is followed by the tutorial sections, see TUTORIAL. The following section describes the command API to the expander this There's no easy way to handle incremental input, as one might wish toĪt present, expander solves the first two problems eventually it will.Quantity of Tcl code examples might easily prefer to use > as the embedded code delimiters instead. Someone producing web pages that include a large ] it's convenient to be able to choose different brackets Embedded commands are necessarily bracketed by [ and.There's no way to identify and process the plain text between twoĮmbedded Tcl commands that makes it difficult to handle plain text in.The subst command is efficient, but it has three drawbacks for Implement a markup language similar to HTML. Given a string with embedded variables orįunction calls, subst will interpolate the variable and functionīy defining a suitable set of Tcl commands, subst can be used to The Tcl subst command is often used to support a kind of Package require textutil::expander ?1.3.1? ![]() Textutil::expander - Procedures to process templates and expand text. Command to display expander manual in Linux: $ man n expander NAME ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |