MCPcopy Index your code
hub / github.com/endbasic/endbasic / get_program_array

Method get_program_array

core/src/vm/mod.rs:424–437  ·  view source on GitHub ↗

Returns the value of an element in the program-scope array variable `key` at the given `subscripts` as a `ConstantDatum`. Returns `Ok(None)` if the variable is not defined (no image is loaded or the variable was not declared). Returns `Err` if the variable exists but is a scalar (use `get_program` instead), or if the subscripts are out of bounds.

(
        &self,
        image: &Image,
        key: &SymbolKey,
        subscripts: &[i32],
    )

Source from the content-addressed store, hash-verified

422 /// variable was not declared). Returns `Err` if the variable exists but is a scalar
423 /// (use `get_program` instead), or if the subscripts are out of bounds.
424 pub fn get_program_array(
425 &self,
426 image: &Image,
427 key: &SymbolKey,
428 subscripts: &[i32],
429 ) -> GetGlobalResult<Option<ConstantDatum>> {
430 self.get_array_var(
431 image,
432 key,
433 &image.debug_info.program_vars,
434 subscripts,
435 Context::get_program_reg_raw,
436 )
437 }
438
439 /// Starts or resumes execution of `image`.
440 ///

Calls 1

get_array_varMethod · 0.80