pub fn opcode_rot(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 3 {
            print_error(chunk, i, "rot requires three arguments");
            return 0;
        }
        let first_rr = self.stack.pop().unwrap();
        let second_rr = self.stack.pop().unwrap();
        let third_rr = self.stack.pop().unwrap();
        self.stack.push(second_rr);
        self.stack.push(first_rr);
        self.stack.push(third_rr);
        return 1;
    }
/// Rotate the top three elements from the stack: the top element
/// becomes the second from top element, the second from top
/// element becomes the third from top element, and the third from
/// top element becomes the top element.
Rotate the top three elements from the stack: the top element
becomes the second from top element, the second from top
element becomes the third from top element, and the third from
top element becomes the top element.
Rotate the top three elements from the stack : the top element becomes the second from top element the second from top element becomes the third from top element and the third from top element becomes the top element .
pub fn opcode_rot(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 3 {
            print_error(chunk, i, "rot requires three arguments");
            return 0;
        }
        let first_rr = self.stack.pop().unwrap();
        let second_rr = self.stack.pop().unwrap();
        let third_rr = self.stack.pop().unwrap();
        self.stack.push(second_rr);
        self.stack.push(first_rr);
        self.stack.push(third_rr);
        return 1;
    }
pub fn opcode_rot ( & mut self , chunk : & Chunk , i : usize ) -> i32 { if self . stack . len ( ) < 3 { print_error ( chunk , i , " " ) ; return 0 ; } let first_rr = self . stack . pop ( ) . unwrap ( ) ; let second_rr = self . stack . pop ( ) . unwrap ( ) ; let third_rr = self . stack . pop ( ) . unwrap ( ) ; self . stack . push ( second_rr ) ; self . stack . push ( first_rr ) ; self . stack . push ( third_rr ) ; return 1 ; }
Rotate the top three elements from the stack: the top element
becomes the second from top element, the second from top
element becomes the third from top element, and the third from
top element becomes the top element.
Rotate the top three elements from the stack : the top element becomes the second from top element the second from top element becomes the third from top element and the third from top element becomes the top element .
&mut self
chunk
&Chunk
i
usize