Assignment

Read(2499) Label: member in the sequence,

Description:

  Assign value to a member of a sequence.

Syntax:

A(i)=x

Assign the ith member of sequence A with the value x

A(p)=x

Parameter is an integer sequence containing ordinal numbers of members of sequence A. Assign value x to members of sequence A corresponding to members of p; member values of p should be less than or equal to the length of sequence A

A(p)=X

Parameter p is an integer sequence containing ordinal numbers of members of sequence A. Assign members of sequence X to members of sequence A corresponding to members of p; p and X should have same lengths.

Parameter:

A

A sequence

i

A number, which is less than and equal to the length of sequence A

x

Data you are about to assign to the members

p

An integer sequence

X

A sequence, of which the data is to be assigned to the members of the sequence

Example:

 

A

 

1

=[1,2,3,4,5]

 

2

>A1(2)="a"

 

3

>A1(4)="b"

 

4

=A1

[1,"a",3,"b",5]

5

>A1([1,2,3])=9

 

6

=A1

[9,9,9,"b",5]

7

>A1([3,4,5])=[8,6,"y"]

 

8

=A1

[9,9,8, 6, "y"]