while. T do. B end. whilst. T do. B end.The last sentence executed in the T block is tested for a non-zero value in its leading atom. If true, the B block is executed. The T block is then retested, and so on, continuing until the T block tests false. (An empty T block result or an omitted T block tests true.)
exp =: 4 : 0 Exponentiation by repeated squaring z=.1 a=.x n=.y while. n do. if. 2|n do. z=.z*a end. a=.*:a n=.<.-:n end. z ) 3 exp 7 2187 3 ^ 7 2187 1.1 exp 0 1 2x exp 128 340282366920938463463374607431768211456