|
|
| version 1.5, 2001/08/07 13:23:33 | version 1.7, 2001/10/19 12:43:29 |
|---|---|
| Line 2 | Line 2 |
| Parser: @b math parser class. | Parser: @b math parser class. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) |
| $Id$ | |
| */ | */ |
| static const char *RCSId="$Id$"; | |
| #include "pa_config_includes.h" | #include "pa_config_includes.h" |
| #include "pa_common.h" | #include "pa_common.h" |
| Line 41 static void _random(Request& r, const St | Line 41 static void _random(Request& r, const St |
| Value& range=params->as_junction(0, "range must be expression"); | Value& range=params->as_junction(0, "range must be expression"); |
| uint max=(uint)r.process(range).as_double(); | uint max=(uint)r.process(range).as_double(); |
| if(max<=1) | if(max<=1) |
| PTHROW(0, 0, | throw Exception(0, 0, |
| &method_name, | &method_name, |
| "bad range [0..%u]", max); | "bad range [0..%u]", max); |