Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ginosko!uunet!mcsun!inria!seti!fitou.uucp!rouaix From: rouaix@fitou.uucp (Francois Rouaix) Newsgroups: comp.sys.amiga.tech Subject: AREXX technical question Keywords: interface error Message-ID: <280@seti.inria.fr> Date: 12 Oct 89 09:03:21 GMT Sender: news@seti.inria.fr Reply-To: rouaix@inria.inria.fr (Francois Rouaix) Organization: The Software Winery Lines: 50 Here is a "technical" question about AREXX. I post is here instead of comp.lang.rexx since it may be Amiga dependent. If you're not familiar with AREXX interfacing, you might want to skip the rest of the article... When you write an AREXX interface for some application (let say with minrexx for example), you have the choice between using commands and functions. The difference for the user is schematically For a command host: address 'myhostportname' 'cmd' par1 par2 ... parn (eventually with option results if you want a result) For a function host: 1> rxlib cmdhost and in scripts res=cmd(par1,par2,...,parn) The host may be considered both as a command host, or a function host, provided it looks at flags RX_COMM / RX_FUNC in the messages, and treats parameters in the appropriate way (ie all parameters in one string for commands, and a parameter per string in function calls). The problem I have is that I can't get error codes when I use function calls. When using commands, it's easy to return the rexx msg with the primary and secondary error codes, so that the script might look at the rc variable to handle the error. However, when I use functions, rx produces an error "error in external function" (i don't have the exact reference here) and I didn't find a way to get some information on what error occurred. My question is: is it possible, and how should i do this ? Thanks for your help --Francois PS: i'll tell you the reason i have for using functions instead of commands. suppose one of your parameters is an amigados file name. It may contain almost any character, in particular spaces. In command mode, since all parameters are in the same string, it is not possible to extract the exact file name without using a quoting mechanism, which is tedious..... (Auxiliary question: do we have a character that may *never* appear in an amigados filename ?) *- Francois Rouaix // We are all prisoners here, * *- rouaix@inria.inria.fr \X/ of our own device * *- SYSOP of Sgt. Flam's Lonely Amigas Club. (33) (1) 39-55-84-59 (Videotex) * Disclaimer: Opinions expressed are my own, not those of my employer.