pub fn create_global(&mut self, name: &str) -> Result<Opr24, ErrorKind> {
      let slot = Opr24::new(self.globals.len().try_into().map_err(|_| ErrorKind::TooManyGlobals)?)
         .map_err(|_| ErrorKind::TooManyGlobals)?;
      self.globals.insert(name.to_owned(), slot);
      Ok(slot)
   }
/// Tries to create a global. Returns the global slot number, or an error if there are too many
/// globals.
Tries to create a global. Returns the global slot number, or an error if there are too many
globals.
Tries to create a global . Returns the global slot number or an error if there are too many globals .
pub fn create_global(&mut self, name: &str) -> Result<Opr24, ErrorKind> {
      let slot = Opr24::new(self.globals.len().try_into().map_err(|_| ErrorKind::TooManyGlobals)?)
         .map_err(|_| ErrorKind::TooManyGlobals)?;
      self.globals.insert(name.to_owned(), slot);
      Ok(slot)
   }
pub fn create_global ( & mut self , name : & str ) -> Result < Opr24 , ErrorKind > { let slot = Opr24 :: new ( self . globals . len ( ) . try_into ( ) . map_err ( | _ | ErrorKind :: TooManyGlobals ) ? ) . map_err ( | _ | ErrorKind :: TooManyGlobals ) ? ; self . globals . insert ( name . to_owned ( ) , slot ) ; Ok ( slot ) }
Tries to create a global.
Tries to create a global .
&mut self
name
&str