From pjw@rhyme.com.au Thu Sep 27 16:09:57 2001
Received: from acheron.rime.com.au (albatr.lnk.telstra.net [139.130.54.222])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f8RE9sv01666;
	Thu, 27 Sep 2001 16:09:55 +0200 (MET DST)
Received: from oberon (Oberon.rime.com.au [203.8.195.100])
	by acheron.rime.com.au (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with SMTP id f8RE9CC27484;
	Fri, 28 Sep 2001 00:09:12 +1000
Message-Id: <3.0.5.32.20010928000912.00b79400@mail.rhyme.com.au>
X-Sender: pjw@mail.rhyme.com.au
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32)
Date: Fri, 28 Sep 2001 00:09:12 +1000
To: Jan Wielemaker <jan@swi.psy.uva.nl>,
   "SWI Mailing List" <prolog@swi.psy.uva.nl>
From: Philip Warner <pjw@rhyme.com.au>
Subject: Re: [SWIPL] Extensions to ActiveX DLL
In-Reply-To: <01092715524502.28162@gollem>
References: <3.0.5.32.20010927223155.0226f600@mail.rhyme.com.au>
 <3.0.5.32.20010927223155.0226f600@mail.rhyme.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

At 15:47 27/09/01 +0200, Jan Wielemaker wrote:
>>
>>FWIW, there are two ways I am considering handling the atom/string input
>>problem: (1) crudely - allow an atom to be passed on single quotes. ie.
>>myAtom = "'name'" (the C-code will look for names containing single-quotes)
>>and (2) the hard way - implementing collection classes for the args, with
>>appropriate properties.
>>
>>At this stage, I am favoring the crude solution, since it is simple and
>>does all that I need.
>
>Not that I use activeX, but this type of programming is dangerous. 
>Things I'm just passing along in variables suddenly gets transformed
>into a string loosing the quotes, etc.

It would be easy enough to add an attribute to the query object to say
'translate quoted strings to atoms', or perhaps, 'treat strings as atoms'
would be better (see below).

>
>Also, why use strings at all?  SWI-Prolog atoms are unlimited

I agree; the problem is that the ActiveX library uses strings by default.
What I'm after is a way to treat the passed parameters as atoms, as you
suggest. Are you suggesting that I should just modify the default
behaviour? This, too, would satisfy my requirements, but will probably
break existing apps - perhaps this can be a user setting. 

Does that sound better?

At least with the user setting, nothing breaks, and the only problem occurs
if we want to pass in strings AND atoms, which seems pointless to me

 
----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

