[clean-list] Communicating with other programs

Marco Kesseler M.Kesseler@aia.nl
Thu, 15 Nov 2001 14:48:52 +0100


Date sent:      	Thu, 15 Nov 2001 14:10:23 +0100
From:           	Siegfried Gonzi <siegfried.gonzi@kfunigraz.ac.at>
Organization:   	Universitaet Graz
To:             	clean-list@cs.kun.nl
Copies to:      	M.Kesseler@aia.nl
Subject:        	Re: [clean-list] Communicating with other programs 

> Marco Kesseler M.Kesseler@aia.nl, schrieb
> 
> >And of  course, you can also call a Clean executable from a C
> >program.
> 
> Is there a documentation somewhere. After reading the hToClean readme, I got the impression that
> only calling a C function is possible.

You are under the right impression. What I meant is that it is 
possible to start a Clean program (possibly with commandline 
arguments) from a program written in C. A program can start 
another program.

> Calling a ready Clean function into C would be easier than calling a program from Clean (at
> least for me, because I am not that fit in the Clean I/O GUI; but I am working to improve it) .
> For example: Ferret lets you call C or Fortran functions, but would it be possible to make a C
> function which in turn calls a Clean function and compile this to a C function and call it from
> Ferret?
> 
> To make it Clear: Is it possible to include in a C program (#include Clean_program.obj) a Clean
> function and then compile this C program to an executable C program for your target machine? And
> this C program then can be used in other tools (GNU-plot, Ferret, IDL, Yorick,...).

I am not sure that I understand what you mean. I can come up with 
two answers:
- An executable generated from Clean is no different from an 
executable generated from C.
-  No, you cannot simply call a Clean function from a C program, 
but I wish it were possible (and yes, this is simpler than calling C 
from Clean, because there is - to some extend - less trouble with 
referential transparency; things get murkier when the called Clean 
function gets a C proc ptr for an argument... or an object with 
methods).

regards,
Marco
----------------------------------------------------------------------
Aia                                     Phone: +31 24 371 02 30
PO Box 38025                            Fax:   +31 24 371 02 31
6503 AA Nijmegen                        Email: M.Kesseler@aia.nl
The Netherlands                         URL:   http://www.aia.nl
----------------------------------------------------------------------
This E-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are adressed. If you have received this E-mail in error please notify
the postmaster (postmaster@aia.nl). The authenticity of this
message cannot, at this moment, be guaranteed by ourselves. For this
reason no legal rights may be granted should the contents differ to
the original sent message. The Aia log-file of sent messages is 
deemed to be the sole, true transcript of communication unless the 
contrary, other than the received message, can be proven.
----------------------------------------------------------------------