$operator for forming an expression sequenceCalling SequenceParametersDescriptionThread SafetyExamplesCompatibility
<Text-field bookmark="usage" style="Heading 2" layout="Heading 2">Calling Sequence</Text-field>expr $ i = m .. nexpr $ m .. nexpr $ n$ i = m .. n$ m .. n$ n`$`( expr, i = m .. n )`$`( expr, m .. n )`$`( expr, n )`$`( i = m .. n )`$`( m .. n )`$`( n )
<Text-field bookmark="bkmrk0" style="Heading 2" layout="Heading 2">Parameters</Text-field>expr-expressioni-unevaluated namem, n-expressions
<Text-field bookmark="info" style="Heading 2" layout="Heading 2">Description</Text-field>In its most general form, expr $ i = m..n, the $ operator returns the expression sequence produced by substituting for i in expr the values m, m+1, ..., n (or up to the last value not exceeding n if n-m is not an integer)If m > n then the NULL (empty) expression sequence is returned.If expr does not refer to i, the right operand of the $ operator can be written as just m..n.Furthermore, if expr does not refer to i and if m is 1, m..n can be specified as just n. Thus, expr $ n produces a sequence of n occurrences of expr.The left operand of $ may be omitted when generating simple sequences of numbers:The forms $ i = m..n and $ m..n are equivalent to i $ i = m..n, and produce the sequence m, m+1, ..., n (or up to the last value not exceeding n).The form $ n is equivalent to i $ i = 1..n when n is of type algebraic.The form $ n when n is a string is equivalent to n[i] $ i = 1..length(n), returning a sequence of the individual characters within the string.The $ operator can also be invoked in function call form, using the name `$`.Note: Some of these calling sequences are not currently supported in 2-D input in the Standard interface. However, equivalent forms work. You can always use the forms expr $ i = m .. n, expr $ n, and $ m .. n.Note: It is recommended (and often necessary) that both expr and i be enclosed in single quotes to prevent premature evaluation. For example, if i had been assigned a value, the i in the expression would be evaluated to its value, and so could not be used as a counting variable. The most common usage is 'expr' $ 'i' = m..n.The seq function, which has many of the same capabilities as the $ operator, has special evaluation rules that make this quoting unnecessary.In a procedure parameter declaration section, $ is used as the end-of-parameters marker. For more information on this use of $, see Parameter Declarations.
<Text-field bookmark="threadsafety" style="Heading 2" layout="Heading 2">Thread Safety</Text-field>The $ operator is thread-safe as of Maple 15.For more information on thread safety, see index/threadsafe.
<Text-field bookmark="compatibility" style="Heading 2" layout="Heading 2">Compatibility</Text-field>The $ operator was updated in Maple 2021.
See AlsocommaParameter Declarationsquotessequneval