--- parser3/src/classes/Attic/random.C 2001/04/05 13:19:39 1.4 +++ parser3/src/classes/Attic/random.C 2001/04/26 15:01:48 1.9 @@ -1,16 +1,13 @@ /** @file - Parser: random parser class. + Parser: @b random parser class. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: random.C,v 1.4 2001/04/05 13:19:39 paf Exp $ + $Id: random.C,v 1.9 2001/04/26 15:01:48 paf Exp $ */ -#include -#include - #include "pa_config_includes.h" #include "pa_common.h" #include "_random.h" @@ -23,13 +20,10 @@ VStateless_class *random_class; // methods -static void _generate(Request& r, const String& method_name, Array *params) { +static void _generate(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - Value& range=*static_cast(params->get(0)); - // (this body type) - r.fail_if_junction_(false, range, method_name, "range must be expression"); - + Value& range=params->get_junction(0, "range must be expression"); uint max=params->size()?(uint)r.process(range).as_double():0; if(max<=1) PTHROW(0, 0,