FWIW we have this function in Swift/T<br><br>(string s) getenv(string key)<br><br><div class="gmail_quote">On Sat, Feb 23, 2013 at 2:15 PM, David Kelly <span dir="ltr"><<a href="mailto:davidk@ci.uchicago.edu" target="_blank">davidk@ci.uchicago.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><font face="times new roman, new york, times, serif" size="3">Is there a function available for reading environment variables within a swift script? I didn't see one mentioned in the userguide, but this seems to work for me:</font><div style="font-size:12pt;font-family:'times new roman','new york',times,serif">
<br></div><div><font face="times new roman, new york, times, serif">string home=@java("java.lang.System", "getenv", "HOME");</font></div><div><font face="times new roman, new york, times, serif"><br>
</font></div><div><font face="times new roman, new york, times, serif">Should we have a function for this? </font><span style="font-family:'times new roman','new york',times,serif">@env("HOME")?</span></div>
<div><br></div></div></div><br>_______________________________________________<br>
Swift-devel mailing list<br>
<a href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a><br>
<a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a><br>
<br></blockquote></div><br>