[system] / trunk / pg / macros / contextLimitedNumeric.pl Repository:
ViewVC logotype

View of /trunk/pg/macros/contextLimitedNumeric.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5551 - (download) (as text) (annotate)
Tue Oct 2 20:48:05 2007 UTC (12 years, 2 months ago) by sh002i
File size: 838 byte(s)
improved formatting for docs -- these were in pod sections but were all
formatted as verbatim sections, and i moved them into normal paragraphs,
lists, etc. should make things more readable from the web.

    1 =head1 NAME
    2 
    3 contextLimitedNumeric.pl - Allows numeric entry but no operations.
    4 
    5 =head1 DESCRIPTION
    6 
    7 Implements a context in which numbers can be entered,
    8 but no operations are permitted between them.
    9 
   10 There are two versions:  one for lists of numbers
   11 and one for a single number.  Select them using
   12 one of the following commands:
   13 
   14     Context("LimitedNumeric-List");
   15     Context("LimiteNumeric");
   16 
   17 (Now uses Parcer::Legacy::LimitedNumeric to implement
   18 these contexts.)
   19 
   20 =cut
   21 
   22 loadMacros("MathObjects.pl");
   23 
   24 sub _contextLimitedNumeric_init {
   25 
   26   my $context = $main::context{"LimitedNumeric-List"} = Parser::Context->getCopy("LimitedNumeric");
   27   $context->{name} = "LimitedNumeric-List";
   28   $context->operators->redefine(',');
   29 
   30   main::Context("LimitedNumeric");  ### FIXME:  probably should require the author to set this explicitly
   31 }
   32 
   33 1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9