Parameter types

Revision as of 00:16, 3 February 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.... X: Unevaluated: X should be.... 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.