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],
)
| 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 | /// |