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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4997 - (download) (as text) (annotate)
Mon Jun 11 18:16:40 2007 UTC (12 years, 8 months ago) by gage
File size: 851 byte(s)
Fixing docementation so that it can be read from the web.

    1 loadMacros('Parser.pl');
    2 
    3 sub _parserNumberWithUnits_init {}; # don't reload this file
    4 
    5 =head1 DESCRIPTION
    6 
    7 ######################################################################
    8 #
    9 #  This is a Parser class that implements a number with units.
   10 #  It is a temporary version until the Parser can handle it
   11 #  directly.
   12 #
   13 #  Use NumberWithUnits("num units") or NumberWithUnits(formula,"units")
   14 #  to generate a NumberWithUnits object, and then call its cmp method
   15 #  to get an answer checker for your number with units.
   16 #
   17 #  Usage examples:
   18 #
   19 #      ANS(NumberWithUnits("3 ft")->cmp);
   20 #      ANS(NumberWithUnits("$a*$b ft")->cmp);
   21 #      ANS(NumberWithUnits($a*$b,"ft")->cmp);
   22 #
   23 
   24 #
   25 #  We now call on the Legacy version, which is used by
   26 #  num_cmp to handle numbers with units.
   27 #
   28 
   29 =cut
   30 
   31 sub NumberWithUnits {Parser::Legacy::NumberWithUnits->new(@_)}
   32 
   33 1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9