jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: command line options (was: Roadmap for 0.99-17)


G. Milde <g.milde@xxxxxx> wrote:
>I did not know about the #stop preprocessor instruction. Is it documented?

The documentation for it is where it should not be: in the code
itself.  I will try to put this in the slang manual and on the web:

 * various preprocessing tokens supported
 *
 * #ifdef  TOKEN1 TOKEN2 ...
 *	- True if any of TOKEN1 TOKEN2 ... are defined
 *
 * #ifndef TOKEN1 TOKEN2 ...
 *	- True if none of TOKEN1 TOKEN2 ... are defined
 *
 * #iftrue
 * #ifnfalse
 * #if true
 * #if !false
 *	- always True
 *
 * #iffalse
 * #ifntrue
 * #if false
 * #if !true
 *	- always False
 *
 * #if$ENV
 *	- True if the enviroment variable ENV is set
 *
 * #ifn$ENV
 * #if !$ENV
 *	- True if the enviroment variable ENV is not set
 *
 * #if$ENV TOKEN1 TOKEN2 ...
 *	- True if the contents of enviroment variable ENV match
 *	  any of TOKEN1 TOKEN2 ...
 *
 * #ifn$ENV TOKEN1 TOKEN2 ...
 * #if !$ENV TOKEN1 TOKEN2 ...
 *	- True if the contents of enviroment variable ENV do not match
 *	  any of TOKEN1 TOKEN2 ...
 *
 *	NB: For $ENV, the tokens may contain wildcard characters:
 *		'?' - match any single character
 *		'*' - match any number of characters
 *
 * #ifexists TOKEN
 * #ifnexists TOKEN
 * #if !exists TOKEN
 *	- check if a variable/function exists
 *
 * #ifeval EXPRESSION
 * #ifneval EXPRESSION
 * #if !eval TOKEN
 *	- evaluates the EXPRESSION as an SLang expression
 *
 * #if (EXPRESSION)
 * #if !(EXPRESSION)
 *	- as per '#ifeval' / '#ifneval',
 *	  evaluates the EXPRESSION as a SLang expression
 *	- using '#ifn (EXPRESSION)' is possible, but deprecated
 *
 * #elif...
 * #else
 * #endif
 *
 * #stop
 *	- stop reading the entire file here, provided that the line
 *	  would have been executed
 *	eg:
 *		#iffalse
 *		#  stop
 *		#endif
 *	would NEVER stop
 *
 * #<TAG>
 *	- start embedded text region
 * #</TAG>
 *	- end embedded text region
 *
 *	All text, include other preprocessing directives, that occurs between
 *	the '#<TAG>' and '#</TAG>' directives will be ignored.
 *	This is useful for embedding other code or documentation.
 *	eg:
 *		#<latex>
 *		\chapter{My Documentation Effort}
 *		#</latex>
 *	NB: * although the current implementation only looks for sequences
 *	      '#<' and '#</', it is advisable to use the full '<TAG>' form
 *	      for documentation purposes and to avoid future surprises.
 *          * do NOT attempt to nest these constructions
 *
 * GENERAL NOTES:
 *   Apart from the '#ifdef' and '#ifndef' constructions, we are quite
 *   generous with accepting whitespace and the alternative '!' form.
 *   eg.,
 *	#ifTEST
 *	#ifnTEST
 *	#if TEST
 *	#if !TEST
 *	#if ! TEST
 *

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]