D's Continous Changing

harakim harakim at Gmail.com
Sat Mar 6 01:53:28 UTC 2021


On Friday, 5 March 2021 at 07:51:24 UTC, Siemargl wrote:
> On Friday, 5 March 2021 at 03:32:35 UTC, harakim wrote:
>> I want this almost every week at work. When I run into some 
>> trivial statement that I need to know for sure how it works, 
>> it's rarely worth it to create a whole new file and make a 
>> main method and all that. I just edit and run the entire 
>> program again, which is a waste of time.
>> So about ten seconds later:
>> PS> rdmd --eval="writeln(format!`%b`(5));"
>> ~\AppData\Local\Temp\.rdmd\eval.F4ADE5F0F88B126B82870415B197BF60.d(18): Error: template argument expected following `!`
>> Failed: ["C:\\Program Files\\D\\dmd2\\windows\\bin\\dmd.exe", 
>> "-d", "-v", "-o-", 
>> "~\\AppData\\Local\\Temp\\.rdmd\\eval.F4ADE5F0F88B126B82870415B197BF60.d", "-I~\\AppData\\Local\\Temp\\.rdmd"]
>>
>> PS> rdmd --eval="writeln(__VERSION__);"
>> 2095
>>
>> That was pretty sweet. However, it kind of goes to the point 
>> of my post. A one-revision difference means the documentation 
>> is not accurate for my compiler.
>>
> This is problem with Powershell. (May by need to create 
> bugreport ?)
>
> This example runs fine from CMD (but i recommend FAR for 
> conveniety) and fails from PS.
>
> Tested Win10.1909, dmd 2.095

The file never includes the quote marks for some reason, I've 
tried a few different ways although I haven't been able to figure 
out why yet. The documentation for powershell says it should 
work. This undocumented feature works though:

PS> rdmd --eval='writeln(format!`"%b`"(78));'
1001110

On Friday, 5 March 2021 at 03:35:31 UTC, Mike Parker wrote:
> On Friday, 5 March 2021 at 03:32:35 UTC, harakim wrote:
>>
>> correct version of compiler, but this will be helpful. Is it 
>> possible to download old versions of the compiler somewhere?
>
> From this page you can follow a trail all the way back to 0.00 
> if you're so inclined:
>
> https://dlang.org/changelog/index.html

Thanks, I bookmarked this.


More information about the Digitalmars-d-learn mailing list