Seb,
If you want other examples of where Genero code has to take the operating system into account.
Operationally the big one that springs to mind is the printing of files, lp versus print. We always did START REPORT TO FILE and did a lp or print for immediate printing or later reprints. Faxing also typically had its own command depending upon the OS.
For debugging purposes if you ever want to get the list of environment variables to check that everything is set up correctly, it is env versus set. We also had something like strings *.42m | grep "$Id" to get the CVS version that we had embedded in the .42m, this was available at run-time for support to check they had the write version of each module, we had no equivalent under a windows system.
I suppose you could argue, do you code as
CASE get_os()
WHEN "*NIX" LET command = "env"
WHEN "WINDOWS" LET command = "set"
END CASE
or do you have portable code but with a little bit of setup outside your application...
LET command = read_from_configuration_file("OS_COMMAND_TO_LIST_ENVIRONMENT_VARIABLES")
LET command = FGL_GETENV("OS_COMMAND_TO_LIST_ENVIRONMENT_VARIABLES")
LET command = "python_script_to_list_environment_variables.py"
or do you use the Java Interface if there is an appropriate Java method out there.
Reuben