Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / DLL or EXE?

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. DLL or EXE?
#11546
Posted by: chucksim 2007-08-17 16:44:31
I am working on a rather large application where I have 100 or so rexx script files (no gui in these) . Some of these files are large and perform a lot of calls to other scripts. I really would like to have them run as quickly and efficiently as I can. I have been playing around with creating a DLL and exe and amhaving the following problem. When I create an exe from one of my scripts that contains a PROCEDURE statement at the top (first statement) I get the following error when trying to execute it ... ' PROCEDURE is valid only when it is the first instruction executed after an internal CALL or function invocation. So my question is, when should I be creating an exe vs a dll. I am able to create a dll, add the statement MACRO test, then call my test.dll.
Chuck Simmons
Message2.
#11548
Posted by: chucksim 2007-08-17 17:34:13
My test.rex is the only file in my project. It is the one with the PROCEDURE statement on the top line. I was thinking I could just call it using iterateexe('test.exe'). Does this calling script have to be in the project as well?
Chuck Simmons
Message3.
#11553
Posted by: Jeff Glatt 2007-08-17 17:54:36
Creating an EXE and running it with ITERATEEXE() is a slow way of running a REXX script (not to mention that the intent of the EXE format wasn't as a way to package child scripts). It creates a new process. The PROCEDURE statement doesn't work across process boundaries, so forget about that. Neither does USE ARG. You have no direct access to the caller's variables. You also can't use UNAME to get the name of your caller. And there are other things that aren't possible across a process boundary. Obviously, it's a bad idea to run a child script in a separate process if you need to be able to interact with the parent.

MACRO dlls do have a speed advantage. Child scripts should be in MACRO dlls.
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2024-4-16  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0