You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,16 @@ To detect if a specific language interface is available, we provide functions st
14
14
There is a namespace stdlib.sys defined under +stdlib/+sys/ that provided system() calls using the system shell as a last-restort fallback if no external language interface is available on the end user computer running Matlab.
15
15
The namespace stdlib.native and stdlib.legacy use plain Matlab code, and allow switching between "modern" and "legacy" implementations of functions as needed.
16
16
17
-
The self-test functions under "test/" directory can be used by Matlab >= R2019b as invoked by "test_main.m" at the top level of the project directory.
17
+
The self-test functions under "test/" directory can be used by Matlab >= R2019a as invoked by "test_main.m" at the top level of the project directory.
18
18
Matlab >= R2022b can alternatively use "buildtool test" to run the self-tests.
19
19
20
+
The key limitations to minimum Matlab version are:
21
+
22
+
* R2017b: fileparts() supports string type. fileparts() is used in many places in the code as it's 5-10x faster than regexp() for filename parsing.
23
+
* R2019a: append() for string and char types. strcat() has the side effect of trimming whitespace, so we prefer append() for string concatenation in case a user path has trailing whitespace.
24
+
* R2019b: function argument validation block "arguments"
25
+
26
+
20
27
## Dev Rules
21
28
22
29
These rules apply under the namespace "stdlib" (directory +stdlib/) and all its sub-namespaces (subdirectories +stdlib/+*).
@@ -25,6 +32,7 @@ These rules apply under the namespace "stdlib" (directory +stdlib/) and all its
25
32
- The code must not require any Matlab toolboxes, only base Matlab functionality
26
33
- Prohibited to use Matlab factory function "isMATLABReleaseOlderThan()" as it is slow and not available for Matlab < R2020b. Instead we use stdlib.matlabOlderThan() which is like 200x faster than isMATLABReleaseOlderThan() and works for Matlab >= R2016b
27
34
- When an exception is encountered, we generally desire that the code return an "empty" value of the appropriate type. In certain cases we may throw or rethrow an error.
35
+
- where the output represents a filesystem path, the output should be a string type if any input is string type, otherwise char type.
0 commit comments