pub fn opcode_isnull(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 1 {
            print_error(chunk, i, "is-null requires one argument");
            return 0;
        }

        let i1_rr = self.stack.pop().unwrap();
        let i1_rrb = i1_rr.borrow();
        let is_null = match *i1_rrb {
            Value::Null => 1,
            _ => 0,
        };
        self.stack.push(Rc::new(RefCell::new(Value::Int(is_null))));
        return 1;
    }
/// Adds a boolean onto the stack indicating whether the topmost
/// element is a null value.
Adds a boolean onto the stack indicating whether the topmost
element is a null value.
Adds a boolean onto the stack indicating whether the topmost element is a null value .
pub fn opcode_isnull(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 1 {
            print_error(chunk, i, "is-null requires one argument");
            return 0;
        }
        let i1_rr = self.stack.pop().unwrap();
        let i1_rrb = i1_rr.borrow();
        let is_null = match *i1_rrb {
            Value::Null => 1,
            _ => 0,
        };
        self.stack.push(Rc::new(RefCell::new(Value::Int(is_null))));
        return 1;
    }
pub fn opcode_isnull ( & mut self , chunk : & Chunk , i : usize ) -> i32 { if self . stack . len ( ) < 1 { print_error ( chunk , i , " " ) ; return 0 ; } let i1_rr = self . stack . pop ( ) . unwrap ( ) ; let i1_rrb = i1_rr . borrow ( ) ; let is_null = match * i1_rrb { Value :: Null => 1 , _ => 0 , } ; self . stack . push ( Rc :: new ( RefCell :: new ( Value :: Int ( is_null ) ) ) ) ; return 1 ; }
Adds a boolean onto the stack indicating whether the topmost
element is a null value.
Adds a boolean onto the stack indicating whether the topmost element is a null value .
&mut self
chunk
&Chunk
i
usize