www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - From the D Blog: Editable and Runnable Doc Examples on dlang.org

reply Mike Parker <aldacron gmail.com> writes:
Sebastian Wilzbach lays out how the new editable & runnable 
documentation examples came to be.

The blog:
https://dlang.org/blog/2017/03/08/editable-and-runnable-doc-examples-on-dlang-org/

Reddit:
https://www.reddit.com/r/programming/comments/5y7umk/editable_and_runnable_doc_examples_on_dlangorg/
Mar 08 2017
parent reply Joakim <dlang joakim.fea.st> writes:
On Wednesday, 8 March 2017 at 13:24:15 UTC, Mike Parker wrote:
 Sebastian Wilzbach lays out how the new editable & runnable 
 documentation examples came to be.

 The blog:
 https://dlang.org/blog/2017/03/08/editable-and-runnable-doc-examples-on-dlang-org/

 Reddit:
 https://www.reddit.com/r/programming/comments/5y7umk/editable_and_runnable_doc_examples_on_dlangorg/
Nice writeup. One issue: if I change the values in the test arrays for the linked example, it usually doesn't compile anymore. I noticed this when this feature was first announced, but forgot to mention it then. Other than that, nice work, especially with the writeln rewriting to show the output.
Mar 08 2017
parent reply Seb <seb wilzba.ch> writes:
On Wednesday, 8 March 2017 at 20:12:51 UTC, Joakim wrote:
 On Wednesday, 8 March 2017 at 13:24:15 UTC, Mike Parker wrote:
 Sebastian Wilzbach lays out how the new editable & runnable 
 documentation examples came to be.

 The blog:
 https://dlang.org/blog/2017/03/08/editable-and-runnable-doc-examples-on-dlang-org/

 Reddit:
 https://www.reddit.com/r/programming/comments/5y7umk/editable_and_runnable_doc_examples_on_dlangorg/
Nice writeup. One issue: if I change the values in the test arrays for the linked example, it usually doesn't compile anymore. I noticed this when this feature was first announced, but forgot to mention it then. Other than that, nice work, especially with the writeln rewriting to show the output.
Thanks for the kind feedback. Could you please explain the bit of the not-compiling examples again? (it works for me)
Mar 08 2017
parent Joakim <dlang joakim.fea.st> writes:
On Wednesday, 8 March 2017 at 22:16:56 UTC, Seb wrote:
 On Wednesday, 8 March 2017 at 20:12:51 UTC, Joakim wrote:
 On Wednesday, 8 March 2017 at 13:24:15 UTC, Mike Parker wrote:
 Sebastian Wilzbach lays out how the new editable & runnable 
 documentation examples came to be.

 The blog:
 https://dlang.org/blog/2017/03/08/editable-and-runnable-doc-examples-on-dlang-org/

 Reddit:
 https://www.reddit.com/r/programming/comments/5y7umk/editable_and_runnable_doc_examples_on_dlangorg/
Nice writeup. One issue: if I change the values in the test arrays for the linked example, it usually doesn't compile anymore. I noticed this when this feature was first announced, but forgot to mention it then. Other than that, nice work, especially with the writeln rewriting to show the output.
Thanks for the kind feedback. Could you please explain the bit of the not-compiling examples again? (it works for me)
If I go to the linked minElement example, click Edit, delete the 1 in the first example and replace it with a 5 or 7, and hit Run, I fairly consistently get a compilation error about not expecting a ",". It doesn't fail every time, but most of the time. I'm doing this from an Android device: could it be some mobile text input issue? Let me know if you can reproduce.
Mar 10 2017