www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How can I append PATH to environment["PATH"] in runtime?

reply Marcone <marcone email.com> writes:
environment["PATH"] ~= r";D:\folder\"; // Error
Mar 12 2020
parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
On 3/13/20 2:08 AM, Marcone wrote:
 environment["PATH"] ~= r";D:\folder\"; // Error
Did you try the long way? environment["PATH"] = environment["PATH"] ~ r";D:\folder\"; It would be nice to have environment support opIndexOpAssign for concatenation. -Steve
Mar 13 2020
parent Marcone <marcone email.com> writes:
On Friday, 13 March 2020 at 13:28:01 UTC, Steven Schveighoffer 
wrote:
 On 3/13/20 2:08 AM, Marcone wrote:
 environment["PATH"] ~= r";D:\folder\"; // Error
Did you try the long way? environment["PATH"] = environment["PATH"] ~ r";D:\folder\"; It would be nice to have environment support opIndexOpAssign for concatenation. -Steve
Very good! Work very well
Mar 13 2020