Creates a new instance of the function.
()
| 74 | impl LboundFunction { |
| 75 | /// Creates a new instance of the function. |
| 76 | pub fn new() -> Rc<Self> { |
| 77 | Rc::from(Self { |
| 78 | metadata: CallableMetadataBuilder::new("LBOUND") |
| 79 | .with_return_type(ExprType::Integer) |
| 80 | .with_syntax(&[ |
| 81 | ( |
| 82 | &[SingularArgSyntax::RequiredRef( |
| 83 | RequiredRefSyntax { |
| 84 | name: Cow::Borrowed("array"), |
| 85 | require_array: true, |
| 86 | define_undefined: false, |
| 87 | }, |
| 88 | ArgSepSyntax::End, |
| 89 | )], |
| 90 | None, |
| 91 | ), |
| 92 | ( |
| 93 | &[ |
| 94 | SingularArgSyntax::RequiredRef( |
| 95 | RequiredRefSyntax { |
| 96 | name: Cow::Borrowed("array"), |
| 97 | require_array: true, |
| 98 | define_undefined: false, |
| 99 | }, |
| 100 | ArgSepSyntax::Exactly(ArgSep::Long), |
| 101 | ), |
| 102 | SingularArgSyntax::RequiredValue( |
| 103 | RequiredValueSyntax { |
| 104 | name: Cow::Borrowed("dimension"), |
| 105 | vtype: ExprType::Integer, |
| 106 | }, |
| 107 | ArgSepSyntax::End, |
| 108 | ), |
| 109 | ], |
| 110 | None, |
| 111 | ), |
| 112 | ]) |
| 113 | .with_category(CATEGORY) |
| 114 | .with_description( |
| 115 | "Returns the lower bound for the given dimension of the array. |
| 116 | The lower bound is the smallest available subscript that can be provided to array indexing \ |
| 117 | operations. |
| 118 | For one-dimensional arrays, the dimension% is optional. For multi-dimensional arrays, the \ |
| 119 | dimension% is a 1-indexed integer.", |
| 120 | ) |
| 121 | .build(), |
| 122 | }) |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | impl Callable for LboundFunction { |
nothing calls this directly
no test coverage detected