Commit dfedca3c73492ccc41f3a48d3b0c1f204c05da79
1 parent
d88c2b3c
Add get_Word8 from web arg
Showing
1 changed file
with
16 additions
and
0 deletions
Show diff stats
web/CXM_web_arg_utils.anubis
| ... | ... | @@ -194,3 +194,19 @@ public define Maybe(Word8) |
| 194 | 194 | else |
| 195 | 195 | success(value) |
| 196 | 196 | }. |
| 197 | + | |
| 198 | +public define Word8 | |
| 199 | + get_Word8 | |
| 200 | + ( | |
| 201 | + List(Web_arg) lwa, | |
| 202 | + String name, | |
| 203 | + Word8 min, | |
| 204 | + Word8 max, | |
| 205 | + Word8 default_value | |
| 206 | + ) = | |
| 207 | + if get_Word8(lwa, name, min, max) is | |
| 208 | + { | |
| 209 | + failure then default_value, | |
| 210 | + success(value) then value | |
| 211 | + }. | |
| 212 | + | ... | ... |