Re: C functions
Posted in 1992
Charles Perez — — source: Informix-list mailing list archive (1991-1998)
In article <5822@jptcs.COM> tps@jptcs.com writes:
>
>Well, 4GL doesn't have a getenv function. Has anyone written one? If so,
>could you post it or email it to me? I don't want to have to struggle
>with the C to hack my own. Are there any other useful functions in C
>that anyone has written?
One way to do it w/out a getenv function is the following:
CREATE TEMP ttable (tt_envvar vartype)
RUN "echo $ENVVAR >filename"
LOAD FROM "filename" INSERT INTO ttable
SELECT tt_envvar INTO catcher FROM ttable
Good luck and enjoy.
--
==========================================================================
That which is necessary is never evil. If an evil seems necessary, look
to your context; that's where its root lies.