Pathagoras Help System

Bracketed vs. Non-bracketed variables

Bracketed vs. Non-bracketed variables

Previous topic Next topic  

Bracketed vs. Non-bracketed variables

Previous topic Next topic  

   A bracketed variable is simply any text that you intend to be a variable that has been surrounded by brackets. E.g., [Customer Name].

   Despite the suggestions and myriad of examples in this Help System, Pathagoras does not mandate [bracketed variables]. Any text can be a variable. “Customer” is just as good as “[Customer]” in many cases.

   Of course, if the word you select as a variable might otherwise appear naturally within the document, then that word should not be used as a variable.

‘Customer’ as a variable is ill advised if the word ‘Customer’ appears in the document as text that you want to keep intact.  (E.g., “The Customer shall be responsible for all shipping costs.”) When Pathagoras searches out ‘Customer’ for replacement with person data, you will end up with “The John Doe shall be responsible . . . .”)

   So, in order to segregate a description variable from other occurrences of the word in the document, brackets are certainly a good way to go. “[Customer]” is not the same as “Customer”.

   Brackets also make the variable stand out in the document. As you are perusing your document for its variables, it certainly easier to see [Customer] than Customer.

   If you plan to take advantage of the <Scan> feature associated with Pathagoras Instant Database and GotForms? modules, the brackets are mandatory.  <Scan> searches the active document for instances of bracketed variables and presents them to you for replacement.

   While on the subject of brackets, if you decide to use them, please know that Pathagoras does not care what kind of ‘brackets’ you use to identify your variables.

You can use [square] [brackets] (the default) or any other type of enclosing character.
So ‘(’ and ‘)’ would work. However, since parentheses occur with great frequency in standard documents when no variable is intended, it is probably not a great idea to use parenthesis.
But “(*” and “*)” could work, as could several dozen other single and double character combinations. ‘{’ and ‘}’ or ‘<’ and ‘>’ or ‘#^” and “^#’.

   Rules (just two):

the enclosing characters must mirror each other. If the character has a natural mirror, e.g., ‘{’ and ‘}’ they must be used. But in a case like ‘#^’ (where no mirror of either character exists), just use the opposite order to mark the close of the variable: ’^#’.
You cannot use ‘<<’ and ‘>>’ as enclosing characters. They are reserved for Clause Sets, document assembly and <<*Optional/Options*>> text block use.