On Dec 6, 2025, at 10:57, Arne Vajh|+j via Info-vax <info-vax@rbnsn.com> wrote:
On 12/6/2025 10:33 AM, Arne Vajh|+j wrote:
On 12/6/2025 5:42 AM, Marc Van Dyck wrote:
User written lexical functions, on the other hand, would be a realAnd even though it is possible to run an exe that set a symbol
bonus. There are, for one, still many parts of the operating system
for which you need to get information, and the only possible way to do >>>> it is to parse some output (think of everything TCP/IP, for example),
while there is a callable interface available to get the info properly. >>> Yes.
with lib$set_symbol, then getting it as a lexical would make it
more readable.
Note that VSI could add it to existing DCL:
f$udl(shrimg, arg1, ...)
with a convention of entry point:
int udl$function(int narg, enum dcl_type *argtyp, void *argval, enum dcl_typ *rettyp, void *retval)
If they wanted to.
New lexical functions have been added over time.
I'll try but likely a waste of time as my posts do not seem to make it through via the mailing list.
Many years ago, I extended DCL with a lexical extension. I called it F$X. There was much talk
at the time about being able to add site lexicals to DCL, so I did the grunt work to see if I could
add such a mechanism. This fell out of my work on the DCL Debugger I was working on at the
time.
IMNSHO, this is not a great idea. DCL programs will be written and shared, and people will not
have the particular extended lexical code. What language will the extended code be written in
if it is shared? C? What if a site doesn't possess a C compiler license?
If thererCOs something not available in DCL today that one believes would benefit by being called
as if a lexical, itrCOs be better to simply write a program that can accept command line arguments
via LIB$GET_FOREIGN, CLI$ and CLD definition, or a combination thereof with LIB$TPARSE
and, if necessary, store results in a symbol.
Extensive programs written in DCL are slow! Sure, itrCOs easy to make quick edits and fixes, but
DCL is not nor should it be considered a programming language like compiled languages.
IrCOd
prefer to see, if something new were to be added, support for larger integer math (ie. 64 bit) is
my request. Of course, it *is* possible now but takes some special effort to perform such math
using F$fao() and the results really arenrCOt rCLintegersrCY as far as DCL is concerned.
On Dec 6, 2025, at 15:23, Arne Vajh|+j via Info-vax <info-vax@rbnsn.com> wrote:
I have always wanted something like:
dcl.init() # open pseudo terminal
res1 = dcl.do(command1) # send command to pseudo terminal and return
output
...
resn = dcl.do(commandn) # send command to pseudo terminal and return
output
dcl.close() # close pseudo terminal
PTD$ routines exist today.
However, yourCOd need a process with DCL mapped
connected
with the pseudo-terminal to execute the command you pass to it.
YourCOd be no better off
than if you used a PIPE because that process is NOT the process for
which you may be
seeking the information (ie. SHOW PROCESS).
I really had to bend over backward to have my DCL debugger work in/with
the current
process because I wanted to be able to debug DCL in the process
environment where a
problem may persent itself. (eg. quotas, rights, privileges, defaults,
etc.) Debugging DCL
in a BATCH or NETWORK process was another goal. Debugging DCL in environments
that are NOT interactive are quite different and there are often
problems that the author
doesnrCOt see until his|her procedure is executing in those environments.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 59 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 22:38:35 |
| Calls: | 810 |
| Calls today: | 1 |
| Files: | 1,287 |
| D/L today: |
12 files (21,036K bytes) |
| Messages: | 195,759 |