simlogo1

 

 

 

SimQuest 6.4 help

 

 

ShiftZ

 

When applied to an array and an integer, ShiftZ produces an array which is obtained by a right shift of the original array with zeros being shifted in on the left. The size of the shift is specified by the integer (negative values correspond to left shifts).
It has three variables: array, shift, and result.

 

Examples:

       zero-shift((a, b, c, d), 1) = (0, a, b, c)

       zero-shift((a, b, c, d), -1) = (b, c, d, 0)

       zero-shift((a, b, c, d), -5) = (0, 0, 0, 0)

 

 

 

Related topics:

 

 

 

Copyright University of Twente 2011