Subject: Re: [SWIPL] Extensions to ActiveX DLL

From: Philip Warner <[email-masked]>
Date: Fri, 28 Sep 2001 00:09:12 +1000

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   |/