Niladic

From NARS2000
Revision as of 02:00, 28 February 2013 by Paul Robinson (talk | contribs)
Jump to navigationJump to search

A function is niladic if it does not accept any arguments. For example:

    ∇ z←dealcard
[1]    z←? 52
    ∇

This function would return a random number in the range 1 - 52, but it would not accept any argument. Such a function might be useful in the case of dealing a card in a game since the number of cards is always the same.

Some System functions are niladic in that they return a value, but you do not present them an argument. The ⎕TS function returns the current time stamp, that is, the current date and time, but you cannot give it a date or time in order to, for example, change the date or time.

See Also