Bug with default implementation

5 views
Skip to first unread message

Ralf Hemmecke

unread,
Jan 14, 2021, 10:46:08 AM1/14/21
to fricas-devel
The attached program does not compile.

(1) -> )co ../foo.spad
Compiling FriCAS source code from file
/home/hemmecke/backup/git/qeta/tmp/../foo.spad using old system
compiler.
QXYZ abbreviates domain QXiYiZi
------------------------------------------------------------------------
initializing NRLIB QXYZ for QXiYiZi
compiling into NRLIB QXYZ

;;; *** |QXiYiZi| REDEFINED
WARNING: redefining BOOT::|QXiYiZi| in DEFUN
WARNING: redefining BOOT::|QXiYiZi;| in DEFUN
Time: 0.00 SEC.

QXYZ- abbreviates domain QXiYiZi&

>> System error:
The variable V is unbound.

===============================================

I probably do not see the obvious error in this program.
Can some help?

Strangely enough if I rename the variable V to W then it complains about
F. How can the name of a variable have influence in such an error?

===============================================

(1) -> )co ../foo.spad
Compiling FriCAS source code from file
/home/hemmecke/backup/git/qeta/tmp/../foo.spad using old system
compiler.
QXYZ abbreviates domain QXiYiZi
------------------------------------------------------------------------
initializing NRLIB QXYZ for QXiYiZi
compiling into NRLIB QXYZ

;;; *** |QXiYiZi| REDEFINED
WARNING: redefining BOOT::|QXiYiZi| in DEFUN
WARNING: redefining BOOT::|QXiYiZi;| in DEFUN
Time: 0.00 SEC.

QXYZ- abbreviates domain QXiYiZi&

>> System error:
The variable F is unbound.

The program compiles, if I remove the

basis: % -> List F

line. It also compiles with that line, if I remove the "add" part.

What am I doing wrong? Or is this a compiler bug?


Ralf
foo.spad

Waldek Hebisch

unread,
Jan 14, 2021, 12:58:44 PM1/14/21
to fricas...@googlegroups.com
On Thu, Jan 14, 2021 at 04:46:03PM +0100, Ralf Hemmecke wrote:
> The attached program does not compile.
>
> (1) -> )co ../foo.spad
> Compiling FriCAS source code from file
> /home/hemmecke/backup/git/qeta/tmp/../foo.spad using old system
> compiler.
> QXYZ abbreviates domain QXiYiZi
^^^^^^

For category you should use:

)abbrev category QXYZ QXiYiZi


--
Waldek Hebisch

Ralf Hemmecke

unread,
Jan 14, 2021, 1:32:41 PM1/14/21
to fricas...@googlegroups.com
)abbrev category QXYZ QXiYiZi

Arrrrhhhh.... I knew it was an obvious error, but I never looked at that
line.

Anyhow, I still consider that a bug. The compiler knows that it compiles
a category and refuse to associate the "domain" abbreviation with a
category.

Waldek, can there at least be a warning for such cases?

Ralf

PS: Thanks also to Riccardo, who has also spotted that category vs.
domain thing in a private mail.
Reply all
Reply to author
Forward
0 new messages