Move (dest, swath, source) – Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 190

Advertising
background image

Section 8. Processing and Math Instructions

8-18

Dim TestYr, LeapStatus

'Declare variables.

TestYr = 1995
If TestYr Mod 4 = 0 And TestYr Mod 100 = 0 Then

'Divisible by 4?

If TestYr Mod 400 = 0 Then

'Divisible by 400?

LeapStatus = True

Else

LeapStatus = False

End If

ElseIf TestYr Mod 4 = 0 Then

LeapStatus = True

Else

LeapStatus = False

End If

Move (Dest, Swath, Source)

Moves a block or fills an array.

Syntax
Move(
Dest, Reps, Source, Reps)

Remarks
Block Move or fill array.

Parameters: Dest array, destination reps; Source array or expression; Source
reps. If source reps is less than destination reps, the remainder of destination is
filled with that last value of source.

Parameter
& Data Type

Enter

Dest
Variable or
Array

The variable in which to store the results of the instruction.

Reps
Constant

The number of repetitions for the measurement or instruction.

Source
Array

The name of the variable array that is the input for the instruction.

Reps
Constant

The number of repetitions for the measurement or instruction.

Move Function Example

The example uses the Move function.

Move(x, 20, y, 20)

'move array y into array x

Move(x, 20, 0.0, 1)

'fill x with 0.0.

NOT

The NOT function is used to perform a logical negation on an expression.

Syntax
result = NOT expression

Advertising