Environment variables: Difference between revisions
Content deleted Content added
Add Jsish |
→Scala: simplify |
||
Line 1,011: | Line 1,011: | ||
=={{header|Scala}}== |
=={{header|Scala}}== |
||
<lang scala>sys.env.get("HOME")</lang> |
|||
{{libheader|Scala}} |
|||
<lang scala>object Environment_variables extends App { |
|||
def variablesToUse = Seq("USERPROFILE", "java.library.path", "PATH", "HOME", "HOMEPATH", "USERNAME") |
|||
println(sys.env.filter(p => variablesToUse contains p._1).toMap.mkString("\n")) |
|||
println |
|||
println (System.getProperty("java.library.path").split(";").mkString("\n")) |
|||
}</lang> |
|||
=={{header|Seed7}}== |
=={{header|Seed7}}== |