[mod.computers.vax] F$element call?

STEINBERGER@SRI-KL.ARPA (Richard Steinberger) (11/06/86)

I have an application were the f$element function would exactly fit the bill.
(This DCL LEX function parses strings and gives you back the element you
request.)  However, I need to use such a function from within a Fortran
program.  Alas, there is no LIB$ELEMENT call, and LIB$TPARSE seems in-
credibly complicated.  What I currently do is parse the string using
various LIB$ and STR$ calls, but it takes several of these as well as some
error checking, etc. to do what a single f$element type call might do.
Someone suggested using LIB$SPAWN to run the F$ELEMENT call, but is is 
unclear how arguments can be passed to and from the calling program;
also spawning is said to be a burden on a uVAX.  Has anyone encountered
this situation before?  Any suggestions?  Thanks in advance.

-Ric Steinberger
STEINBERGER@SRI-KL.ARPA.#INTERNET

-------

LEICHTER-JERRY@YALE.ARPA (11/07/86)

    I have an application were the f$element function would exactly fit the
    bill.  However, I need to use such a function from within a Fortran
    program.  Alas, there is no LIB$ELEMENT call....  Someone suggested using
    LIB$SPAWN to run the F$ELEMENT call, but is is  unclear how arguments can
    be passed to and from the calling program; also spawning is said to be a
    burden on a uVAX....
Spawning a subprocess to use F$ELEMENT is killing flies with an elephant
gun.  F$ELEMENT is a pretty trivial function - it should amount to a couple
of lines of code in any language at all comfortable with strings.  In portable
FORTRAN IV, it might be a little tough, but in any recent FORTRAN?

Why not write it once as a callable function in whatever language you are most
comfortable with, and be done with it?
							-- Jerry
-------