pub fn opcode_lt(&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_lt_inner(chunk, i, &v1_rrb, &v2_rrb);
        if res == 0 {
            print_error(chunk, i, "< requires two comparable values");
            return 0;
        }
        return 1;
    }
/// Takes two values as its arguments, checks whether the first is
/// less than the second, and places the result onto the stack.
Takes two values as its arguments, checks whether the first is
less than the second, and places the result onto the stack.
Takes two values as its arguments checks whether the first is less than the second and places the result onto the stack .
pub fn opcode_lt(&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_lt_inner(chunk, i, &v1_rrb, &v2_rrb);
        if res == 0 {
            print_error(chunk, i, "< requires two comparable values");
            return 0;
        }
        return 1;
    }
pub fn opcode_lt ( & 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_lt_inner ( chunk , i , & v1_rrb , & v2_rrb ) ; if res == 0 { print_error ( chunk , i , " " ) ; return 0 ; } return 1 ; }
Takes two values as its arguments, checks whether the first is
less than the second, and places the result onto the stack.
Takes two values as its arguments checks whether the first is less than the second and places the result onto the stack .
&mut self
chunk
&Chunk
i
usize