| Posted by Emmanuel ® , 04/14/2011, 15:03:34 | Reply | Forum |
Today, I will present a quite exotic example. It shows how I can use a pick list to handily repeat an expansion in a loop as many times as I want. I am sure you will find situations where this can be useful.
I for myself, often separate blocks of text with lines of stars, when I write documents or programs. Sometimes one, sometimes two or more... Here let me put 4 lines of stars before continuing:
****************************************
****************************************
****************************************
****************************************
For that I use a very special pick list, a pick list with only one item, a special item that contains:

In my Commands.glo glossary that I include at the top of all my other glossaries, I have added an entry which contains:

Now when I want to type one ore more line of stars, I expand my starlines entry:

At that point, if I want additional star lines, all I have to do is hit my semi colon marker in a loop until I have the desired number of star lines. As this is recursive, the advisories will always propose me an additional line of stars. So you may wonder, how do I stop this loop? Simply by ignoring the displayed pick list item when I am done and continue typing whatever I want to. The fact that the advisories display a pick list does not mean that you mandatorily need to pick something. :-)
I hope you get the idea.
Kind regards,
Emmanuel
| Edit | Reply | | View All | | | Current page | Author |
|