🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #6015

Rascal Fun

#6015
From: Paul DuBois
Date: Tue, 10 Jun 1986 18:31
31 lines
1664 bytes
Here's a little ditty that illustrates a Rascal oddity (or bug).
There are two modules, TestA and TestB.  The procedure TestProc is
defined in each (they are slightly different).  Presumably, with smart
linking, only one instance should get linked in, right?  Here's a
circumstance where they will both get pulled in, AND BOTH USED!  First
I call TestProc directly. Then I call it indirectly by calling a proc
in the other module that calls TestProc.

Compile TestB, then Compile, Link and Execute TestA, to replicate.

The output is 'xy'.  I would expect it to be 'xx'.

------
Program TestA;
Uses __QuickDraw ;
Link TestB : ;
Proc TestProc (); { DrawChar ('x'); };
Proc _Init (); { TestProc (); ITestProc (); };
--------
Program TestB;
Uses __QuickDraw ;
Proc TestProc (); { DrawChar ('y'); };
Proc ITestProc (); { TestProc (); };
------
-- 
Paul DuBois     UUCP: {allegra,ihnp4,seismo}!uwvax!uwmacc!dubois    |
                ARPA: dubois@easter                               --+--
                                                                    |
Doth the hawk fly by thy wisdom, and stretch her wings              |
toward the south?                        Job 39:26
Technical Details
Message-ID: <2251@uwmacc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!harvard!topaz!uwvax!uwmacc!dubois

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!harvard!topaz!uwvax!uwmacc!dubois
From: dubois@uwmacc.UUCP (Paul DuBois)
Newsgroups: net.micro.mac
Subject: Rascal Fun
Message-ID: <2251@uwmacc.UUCP>
Date: Tue, 10-Jun-86 14:31:25 EDT
Article-I.D.: uwmacc.2251
Posted: Tue Jun 10 14:31:25 1986
Date-Received: Sat, 14-Jun-86 04:00:43 EDT
Distribution: net
Organization: UW-Madison Primate Center
Lines: 31