[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323
Bernhard R. Link
brlink at debian.org
Tue Apr 24 15:55:37 UTC 2012
The following commit has been merged in the cleanedupstream branch:
commit ba51da3ca909b587f41fe7256c36714e72a1532b
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date: Wed Apr 11 14:59:08 2012 +0200
chg: handling of alias (for example p(1+2))
diff --git a/Singular/ipshell.cc b/Singular/ipshell.cc
index 359710e..b079f8b 100644
--- a/Singular/ipshell.cc
+++ b/Singular/ipshell.cc
@@ -2,7 +2,7 @@
* Computer Algebra System SINGULAR *
****************************************/
/*
-* ABSTRACT:
+* ABSTRACT: helper routines for the interpreter
*/
//#include <stdlib.h>
@@ -1194,8 +1194,10 @@ BOOLEAN iiAlias(leftv p)
h->next=NULL;
if (h->rtyp!=IDHDL)
{
- WerrorS("identifier required");
- return TRUE;
+ BOOLEAN res=iiAssign(p,h);
+ h->CleanUp();
+ omFreeBin((ADDRESS)h, sleftv_bin);
+ return res;
}
if (h->Typ()!=p->Typ())
{
diff --git a/Tst/Short/alias.tst b/Tst/Short/alias.tst
new file mode 100644
index 0000000..656df27
--- /dev/null
+++ b/Tst/Short/alias.tst
@@ -0,0 +1,23 @@
+LIB "tst.lib";
+tst_init();
+
+proc probe(alias list args)
+{
+args;
+typeof(args);
+int i = size(args[1]);
+}
+
+ring r = 0, x, dp;
+ideal i = x;
+list l = list(i, 2);
+
+probe(l);
+
+proc probe2(alias list i) { i; };
+
+list n = 1;
+probe2(n);
+
+tst_status(1);$
+
diff --git a/Tst/Short/ok_s.lst b/Tst/Short/ok_s.lst
index 4d27dcf..c24c92b 100644
--- a/Tst/Short/ok_s.lst
+++ b/Tst/Short/ok_s.lst
@@ -1,6 +1,7 @@
;; Test which should pass shifted exponents
alexpoly
algebralib
+alias
allres_s
barei_s
betti_s
--
an open source computer algebra system
More information about the debian-science-commits
mailing list