Parameter types

Revision as of 18:21, 26 March 2007 by Max (talk | contribs)

This explains the syntax used for precise definition of what kinds of parameters a function expects, and what it does with them. The syntax and options are the same as the parameter qualifier syntax used for defining parameters for User-defined Functions:

x: Number: x should be a number or array of numbers. INF, -INF, NAN, and NULL qualify as numbers in this case.

x: Positive: x should be a number greater than zero.

x: NonNegative: x should be a number that is zero or greater.

b: Boolean: b should be False (0) or True (1). Actually, Analytica treats any nonzero as True.

t: Text: Parameter t should be a text or array of texts.

t: Text Coerce: If t is a number, it will be coerced to become at Text, i.e. converted into a text, using the Number Format specified for this variable (or default Number specified). For example, if the Number Format is set to Date, it will become a text containing the date.

x: Optional: The parameter x is optional.

x: Number = 99: x is an optional number and defaults to 99

X: Unevaluated: X should be....


Examples

PDF(x: [I]; I: IndexType=Run; w: NonNegative[I]=SampleWeighting; discrete: optional Boolean; method, samplesPerStep: optional positive; domain: Unevaluated = x)

Comments


You are not allowed to post comments.