Article View: comp.lang.prolog
Article #1493Writing portable code.
From: Kjell Post
Date: Sun, 27 Sep 1992 08:54
Date: Sun, 27 Sep 1992 08:54
18 lines
1094 bytes
1094 bytes
Let me explain by an example what I'm looking for. I want to write a program that works for both SICStus Prolog and Sepia. The problem is that I need to retract all clauses foo/n when the program is started. Now, in SICStus the procedure is called retractall/2, but in Sepia it is retract_all/2. That extra underscore (or absence of it) is really annoying! So I'd like to hear about efficient and portable tricks to write code that works in both languages. Should I use call/1? Should I write "retractall(H) :- retract_all(H)." and rely on the fact that SICStus just issues a warning when an a built-in predicate is being redefined? Any better ideas? --Kjell kjell@cs.ucsc.edu
Technical Details
Message-ID:
<1a3srjINNsgm@darkstar.UCSC.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!darkstar.UCSC.EDU!kjellShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!darkstar.UCSC.EDU!kjell From: kjell@cse.ucsc.edu (Kjell Post) Newsgroups: comp.lang.prolog Subject: Writing portable code. Date: 27 Sep 1992 08:54:11 GMT Organization: University of California, Santa Cruz (CE/CIS Boards) Lines: 18 Distribution: world Message-ID: <1a3srjINNsgm@darkstar.UCSC.EDU> NNTP-Posting-Host: arapaho.ucsc.edu