bl791's picture
download
raw
904 Bytes
/* This is a simple use of the parseError function to enclose
* special parser messages in brackets. Requires at least
* TADS 2.0, due to the use of parseError.
*/
parseError: function( errno, str )
{
/* Exclude disambiguation messages, which start at 100,
* from bracket use.
*/
if ( errno < 100 ) return( '[' + str + ']' );
/* Use a left bracket for words designating the beginning
* of certain error messages.
*/
if ( errno = 110 or errno = 140 ) return( '[' + str );
/* Use a right bracket for punctuation designating the end
* of certain error messages.
*/
if ( errno = 115 or errno = 143 ) return( str + ']' );
/* If this spot is reached, no brackets are necessary, so
* simply return a nil value.
*/
return( nil );
}
/* There you have it! Just include this in your program and
* watch those brackets magically appear. Send comments to:
* bweber@bucknell.edu
*/

Xet Storage Details

Size:
904 Bytes
·
Xet hash:
60176282c537cafb529c72e8f1e3d26f4b7a5b0141836e64b98fc48d62d707cc

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.