From 1cbf33913e64547ed11f6005533f108164a003fe Mon Sep 17 00:00:00 2001 From: Josh Davies Date: Thu, 2 Jul 2026 09:39:48 +0100 Subject: [PATCH] doc: clarify variable-ordering behaviour after using Loaded expressions Closes #465. --- check/coverage.frm | 15 +++++++++++++++ check/examples.frm | 2 +- doc/manual/statements.tex | 6 +++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/check/coverage.frm b/check/coverage.frm index 237f137c..b03b7ccb 100644 --- a/check/coverage.frm +++ b/check/coverage.frm @@ -464,6 +464,21 @@ Print; assert succeeded? assert result("G") =~ expr("1048576 + p.q + p(mu) + e_(p,q) + g(2) + T(q) + T(mu) + f(1)") *--#] cov_saveload : +*--#[ cov_saveload_err : +Symbol x; +Global F = x; +.store +Save test.sav F; +.end +Load test.sav F1; +.end +assert runtime_error? +assert stdout =~ exact_pattern(<<'EOF') + Load test.sav F1; +Cannot find expression F1 + F1 not found +EOF +*--#] cov_saveload_err : *--#[ cov_symm : * pattern matching of functions with symmtry properties Indices x1,x2,x3,x4,x5; diff --git a/check/examples.frm b/check/examples.frm index 66508983..b2d7ae37 100644 --- a/check/examples.frm +++ b/check/examples.frm @@ -850,7 +850,7 @@ assert succeeded? assert result("F") =~ expr(" 8 ") -*--#] Sta_Dropsymbols_1 +*--#] Sta_DropSymbols_1 *--#[ Sta_FactArg_1 : *TODO: OldFactArg is needed for the result in the manual. On OldFactArg; diff --git a/doc/manual/statements.tex b/doc/manual/statements.tex index 9bbce888..07b48e4e 100644 --- a/doc/manual/statements.tex +++ b/doc/manual/statements.tex @@ -3235,7 +3235,11 @@ \section{load} expression is not present, an error will result. If one does not know exactly what expressions are present in a file one could load the file without a list of expressions, because \FORM\ will list all expressions that -it encountered. \vspace{10mm} +it encountered. When using multiple loaded expressions on the right-hand side +of definitions or statements, which each depend on a subset of a larger set of +definitions, the final variable ordering may not be what is expected. If the +ordering is important, one should manually define all variables in the required +order before using loaded expressions from the storage file. \vspace{10mm} %--#] load : %--#[ local :