operator for forming an expression sequence - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Flow Control : Iteration or Looping : $

$ - operator for forming an expression sequence

Calling Sequence

expr $ i = m..n

expr $ n

$ m..n

Parameters

expr

-

expression

i

-

unevaluated name

m, n

-

expressions

Description

• 

You can use the $ operator to return 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 m>n then the NULL expression sequence is returned.

• 

A call to $ in the form:  $ m..n will have the same effect as the call: i $ i = m..n.

• 

A call to $ in the form:  expr $ n will have the same effect as the call: expr $ i = 1..n  (assuming that expr does not contain i).

• 

Note:  It is recommended (and often necessary) that both 'expr' and 'i' be enclosed in single quotes to prevent premature evaluation. (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 use is 'expr' $ 'i' = m..n.

• 

For information on the end-of-parameters marker $, see Parameter Declarations.

Thread Safety

• 

The $ operator is thread-safe as of Maple 15.

• 

For more information on thread safety, see index/threadsafe.

Examples

`$`2..5

2,3,4,5

(1)

i2$i=23..83

49,259,649

(2)

ai$i=1..3

a1,a2,a3

(3)

x$4

x,x,x,x

(4)

See Also

comma, Parameter Declarations, quotes, seq, uneval


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam