var n = input("The current year is: [year].", "Set Year", "") as null | num
For the 'as null | num' part, what exactly are those two things? I think they're supposed to be type and list but null is a type? num is a list? I'm not sure how this works exactly.
The num part is telling input() to expect a numerical entry (and changes its style to the numerical form...)
If you want a cancel button while making a choice from a list, the argument would be as null|anything in [list].
The | is known as a binary-OR. The options are in binary and this could be thought as "combining" the options. (For more on bit operations/flags, please see this article).
For other options, please view the arguments (verb) entry.