pub fn opcode_divide(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 2 {
            print_error(chunk, i, "/ requires two arguments");
            return 0;
        }

        let v1_rr = self.stack.pop().unwrap();
        let v1_rrb = v1_rr.borrow();
        let v2_rr = self.stack.pop().unwrap();
        let v2_rrb = v2_rr.borrow();

        let res = self.opcode_divide_inner(chunk, i, &v1_rrb, &v2_rrb);
        if res == 0 {
            print_error(chunk, i, "/ requires two numbers");
            return 0;
        }
        return 1;
    }
/// Takes two values as its arguments, subtracts them, and places
/// the result onto the stack.
Takes two values as its arguments, subtracts them, and places
the result onto the stack.
Takes two values as its arguments subtracts them and places the result onto the stack .
pub fn opcode_divide(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 2 {
            print_error(chunk, i, "/ requires two arguments");
            return 0;
        }
        let v1_rr = self.stack.pop().unwrap();
        let v1_rrb = v1_rr.borrow();
        let v2_rr = self.stack.pop().unwrap();
        let v2_rrb = v2_rr.borrow();
        let res = self.opcode_divide_inner(chunk, i, &v1_rrb, &v2_rrb);
        if res == 0 {
            print_error(chunk, i, "/ requires two numbers");
            return 0;
        }
        return 1;
    }
pub fn opcode_divide ( & mut self , chunk : & Chunk , i : usize ) -> i32 { if self . stack . len ( ) < 2 { print_error ( chunk , i , " " ) ; return 0 ; } let v1_rr = self . stack . pop ( ) . unwrap ( ) ; let v1_rrb = v1_rr . borrow ( ) ; let v2_rr = self . stack . pop ( ) . unwrap ( ) ; let v2_rrb = v2_rr . borrow ( ) ; let res = self . opcode_divide_inner ( chunk , i , & v1_rrb , & v2_rrb ) ; if res == 0 { print_error ( chunk , i , " " ) ; return 0 ; } return 1 ; }
Takes two values as its arguments, subtracts them, and places
the result onto the stack.
Takes two values as its arguments subtracts them and places the result onto the stack .
&mut self
chunk
&Chunk
i
usize