Skip navigation links
Expressively and easily automate your text documents with TExpressive!
Menu
TExpressive
Expressively and easily automate your text documents with TExpressive!

MakeFunction function

Creates a new function with the given name and the given arguments.&nbap; In the new function's "Content", you can use the arguments as regular parameters.

Remarks

  • Every "Arg" argument must also be specified when the function is used.
  • An "OptArg" argument doesn't need to be specified when the function is used; to see whether the argument has been specified you can use the "If" function with "IsSet"/"IsNotSet".
  • An "OptEmptyArg" argument doesn't need to be specified when the function is used; when it isn't specified it will still be set to an empty value.
  • A "MutliArg" argument must be specified 1 or more times; the supplied values are not stored in the argument directly but as subparameters of the argument.  You can use the "ForEach" function to process all specified values.
  • An "OptMultiArg" argument works identical to a "MultiArg" argument, but is optional for the caller.  If the argument isn't specified the argument will not be set.
  • If an already existing parameter has the same name as one of the arguments, it is not accessible from within the new function (the argument hides the parameter).  When the function's content is processed, all hidden parameters will be available again.
  • When you give the new function the same name as an existing function, that other function will be hidden until the new function is deleted again.  When you use the same name as a predefined function, that predefined function will thus (temporarily) not be useable anymore.

Arguments

Name
The name of the function to create.
Arg (optional multiple times)
A required argument for the new function.
OptArg (optional multiple times)
An optional argument for the new function.
OptEmptyArg (optional multiple times)
An optional argument for the new function which will have an empty value if not specified.
MultiArg (optional multiple times)
A required argument for the new function which the caller may specify multiple times.
OptMultiArg (optional multiple times)
An optional argument for the new function which the caller may specify multiple times.
Content
The content to process by the function.  May of course also contain literal text or a parameter reference.