Your own message partly anticipates my answer! You can use [queryString] to take in inputs in the usual way and process them however you like, since [queryString] has a [show] instance.

However, even easier might be to change your function to take a plain old [string] as argument and parse it as you please.

On 03/09/2016 10:26 PM, Artyom Shalkhakov wrote:
Hello all,

How to handle optional arguments? For instance, I'm writing a
pagination script and page number is an optional argument. If I use
the following function for pagination:

fun mypaginator (page_nr: option int): transaction page = ...
Which maps to the URL of the form:

/Mymodule/mypaginator/Some/1
or of the form:

/Mymodule/mypaginator/None
Which users will not like, I guess.

Coincidentally, why are there no functions to work with the type [queryString]?



_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to