No matter how you cut it, there is a 'language' inherent to the way you structure any automated document. Whether you are creating a Pathagorized document, or one using HotDocs or TheFormTool, you must obey the rules or else you will not get the results you expect. Even 'plain text' -- the underpinning of Pathagoras -- has rules.
The rules that span all programs involve:
•establishing boundaries that provide begin and end points for certain operations as well as grammar and syntax requirements imposed by the program. In most other programs, the field codes (displayed in gray backgrounds with commands either visible or invisible) denote those endpoints.
•commands, and the behind the scenes coding that.understands and interprets the operation that is being requested.
•'arguments' (sub-commands that varies the action of a parent command to accomplish a 'narrower' or specialized goal.
•separators: markers that indicate the begin and end points of each item in a multiple choice list.
•links or cross-references that allow cascading changes to be made in multiple sections of a document at once.
•processing order.
So, with those elements in mind, let's explore PathagoCode: Pathagoras' programming language (Yes, it's a totally made up name, but it seems to fit)
Boundaries (what must precede and follow a section of text for Pathagoras to recognize it as 'special'):
Variables: In order for Pathagoras to recognize a word(s) as a 'variable', it must be surrounded by unique characters. By default, those unique characters are '[' and ']'. The characters can actually be just about anything you want, but no more that two characters on each end. You can reset them to your liking (with just a few exceptions) as discussed here.
Conditional and Repeat text: Pathagoras recognizes the markers '<<' and '>>' as boundaries for Options and Optional and Repeat blocks of text. (We also refer to these blocks of text as 'process' blocks. These typically larger text blocks are intended to be 'manipulated in some fashion (kept, deleted, partially kept or deleted, or repeated) to result it the text you ultimately want in the final version of your document.
*Alias* terms. An 'alias' is a single word or short phrase that calls on a longer (and sometimes very long) list of choices. (Think a list of all 50 Uniited States, all being called by the single word *states*. The boundary markers for an alias are asterisks (stars). Read more about *aliases* (how to create them, how to call for them) at this link.
Dividers and Separators: (what Pathagoras is looking for when creating multiple choice screens for you):
Basic: the basic divider between the multiple choices in a [multiple/choice/variable] or in an <<*Options*...>> block is a simple slash. If the text contains a 'natural slash' (e.g., 'and/or', 'A/K/A' etc.) and you have to distinguish a divider from that natural slash, use '/OR'.
Administrative text: Pathagoras needs to know where the end of the command and prompt language is. An asterisk ('*') is used to denote the end of Administrative text. (Note: It is not necessary to add !groups! or prompts to <<*Optional*...>> and <<*Repeat*...>> text, but if you do, you must mark the end with an asterisk. 'Administrative text' is that text which is not substantive and therefore will never be left in the document.
Super Separators: This link explains the 'how and why,' but when your document is full of <<*Options*. . .>> blocks that contain nested <<*Options*. . .>> or <<*Repeat*. . .>> blocks or many variables, consider these Super Separators.
Commands:
*Optional*
*Options*
*Repeat*
*AskOptional*
*AskOptions*
*AskRepeat*
Arguments: Arguments modify commands to cause them to behave with more desired results.
For *Options*
(cumulative)
(cumulative,and)
(cumulative,or)
(cumulative;or
For *Repeat*
(return,1)
(return,2)
Links and Cross-references:
To tell Pathagoras to apply an answer given at the 'top' of the document to text that appears below, all that Pathagoras requires is the insertion of a !groupname! within the administrative text of a process block, or at the very beginning of a variable. A groupname is noted with exclamation marks ('!groupname!') as the boundaries.
AskTable Logic:
*If*
*Remarks* (*Remark* is okay)
*Set*
*Get*
*Break*
*SetTitle*
<<*Prompt*>>
Order of Document Processing
There is a specific sequence in which the various commands in a Pathagorized document will be processed. By understanding this sequence, you can actually control with precision the order in which various elements of your document will be processed.
1.If there are any Ask (Interview) table elements, they will be processed from top, down. (This is where you will have the most control over processing order.)
2.Next (or first if there are no Ask elements), Pathagoras will process any <<*Options*>> and <<*Optional*>> elements as encountered, from top to bottom.
3.<<*Repeat*>> elements are processed only after all <<*Options/Optional*>> elements have been process. (If you want <<*Repeat*>> elements processed first, you need to reference them as <<*AskRepeat*>> at the top of the document.)
4.Only after elements surrounded by '<<' and '>>' boundaries is the document 'ready' to be personalized. And by that, we are referring to replacing [variables] with personal data. Unless your setting are set to 'Automatically Scan after Processing,' this will require an extra keystroke -- <Alt-D>,
A few 'exceptions'
Simple Optional text: Curly braces '{' and '}' tell Pathagoras to stop, highlight the text between the curly braces and ask if the text should be kept or deleted.
<<Document calls>> When you enclose text within << and >> markers, there is no *command* for Pathagoras to process. Pathagoras will therefore see the text inside the markers as a document and will attempt to call it from about 15 different locations that Pathagoras is programmed to look. (This is a very quick, split second, process.)
Now, if your ultimate question is 'what is the programming language that Pathagoras is using behind the screens to implement (read, interpret, decode, process and present) the above language, it is Visual Basic for Applications (VBA). VBA is Microsofts macro writing language. Pathagoras is actually one great big macro (comprising about 3/4 million lines of code). If you took the time, you likely could duplicate what Pathagoras can do using Word's macro editor. We just hope that your will find the work we have already done for you is worth the price of not trying to code a Pathagoras clone on your own.