www.delorie.com/gnu/docs/gcal/gcal_46.html   search  
Buy GNU books!

Gcal 3.01

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

G. %?... Special Texts

G.1 %?... special texts for date exclusion  How to Exclude dates.
G.2 %?... special texts for text replacement  How to Replace texts.
G.3 Shell command %![argument] special text  How to run a Shell Command.

The %?... special texts which can be used in the text part of a Gcal resource file line can coarsely be separated into three categories. So there are special texts used for suppression output of fixed dates in definite cases. Others are replaced by particular texts or cause the shell to start external commands. See section %?... Special Texts, for a general description of the special texts which may be used in the text part of a Gcal resource file line.

Some of these special texts may have an optional format instruction (called format in the further context), which affects the representation of an expanded special text. See section J. Format Instruction, for the detailed description of the format instruction and its components. A possibly specified format within special texts which may not have a format instruction is ignored by Gcal and not displayed in output.

But Gcal is also able to represent such special texts in a special way by using a format instruction, and that by using an indirect method. For displaying, you simply assign the special text exclusively to a text variable which contains a format instruction. Nevertheless, it is important to note that the field width component of the format instruction is chosen in the way that it refers to the assigned contents of the text variable, if the format instruction has a fixed format component. The contents assigned to the text variable is only the special text, and not its expanded result. Gcal has to proceed like that, because the special text which is hidden in the text variable could not be used (here: displayed) only for a definite date, but possibly also for several dates, and that adjusted to each date it is referenced. Thus exists a special text in the text variable which has a definite length, and a format instruction also exists, whose field width component has to affect the expanded result of the special text. Indeed, Gcal does not know at the moment when the assignment of the special text to the text variable is made, of which length the expanded result will be, because this expansion is made at a much later phase in the program execution. So, in such a case, the field width component of a format instruction should have the length of the special text minimum, otherwise it is crippled and expanded respectively displayed incorrectly by the internal methods which effect the expansion.

Of course, not all possibilities concerning the representation --which are offered by the format instruction-- are listed here for those special texts those expanded representation may be affected by an optional format instruction, but only some few exemplary.

And some of these special texts may also have an optional simple or special date argument (called date in the further context) or another argument (called argument in the further context). The date argument must be given in one of the following date formats in case a special text is directly trailed by it:

Special texts that may have a date argument must always be trailed by a whitespace character which is removed in output, no matter whether date was given or not!

See section Summary of all %?... Special Texts, for a short-list of all applicable special texts.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003