[m-users.] Foreign language interface
Zoltan Somogyi
zoltan.somogyi at runbox.com
Wed Sep 14 03:57:09 AEST 2022
2022-09-14 03:52 GMT+10:00 "Volker Wysk" <post at volker-wysk.de>:
> Am Mittwoch, dem 14.09.2022 um 03:46 +1000 schrieb Zoltan Somogyi:
>> Note that the library module io.environment contains several predicates
>> for accessing the environment, which work when targeting Java and C#
>> as well as C, and on several operating systems. (This module is new;
>> it was recently carved out of io.m.)
>
> I have looked at the io.environment module beforehand. I've written my own
> foreign predicate because there's no predicate for reading the whole
> environment. Only specific environment variables can be queried.
The get_environment_var_map predicate returns the entire environment,
though in a different (but usually more useful) form: a map from var names
to values, not a list of strings containing name=value pairs.
> And I wanted to learn the FFI. :-)
That I can't argue with :-)
Zoltan.
More information about the users
mailing list