Re: Documentation generator is not working

2021-09-06 Thread Vinod K Chandran via Digitalmars-d-learn

On Monday, 6 September 2021 at 01:19:04 UTC, Ali Çehreli wrote:



Yes, but it was meant to be a joke. Don't do that. :)



Ha ha, okay :)




Re: Documentation generator is not working

2021-09-05 Thread Ali Çehreli via Digitalmars-d-learn

On 9/5/21 3:22 PM, Vinod K Chandran wrote:

On Friday, 3 September 2021 at 20:21:43 UTC, Ali Çehreli wrote:


So, change your program to respond to -D and generate the 
documentation potentially by spawning a dmd instance. :o)



I am not sure i get the point correctly. You mean, starting dmd as a new 
process from my program and pass the file name as parameter ?


Yes, but it was meant to be a joke. Don't do that. :)

Ali



Re: Documentation generator is not working

2021-09-05 Thread Vinod K Chandran via Digitalmars-d-learn

On Friday, 3 September 2021 at 20:21:43 UTC, Ali Çehreli wrote:


So, change your program to respond to -D and generate the 
documentation potentially by spawning a dmd instance. :o)



I am not sure i get the point correctly. You mean, starting dmd 
as a new process from my program and pass the file name as 
parameter ?


Re: Documentation generator is not working

2021-09-03 Thread Ali Çehreli via Digitalmars-d-learn

On 9/2/21 10:38 AM, Vinod K Chandran wrote:

On Thursday, 2 September 2021 at 17:34:59 UTC, Adam D Ruppe wrote:


Anything after -run goes to your program not the compiler.

Args to the compiler must be before -run.


Thanks for the reply. Got the point now. :)



So, change your program to respond to -D and generate the documentation 
potentially by spawning a dmd instance. :o)


Ali




Re: Documentation generator is not working

2021-09-02 Thread Vinod K Chandran via Digitalmars-d-learn

On Thursday, 2 September 2021 at 17:34:59 UTC, Adam D Ruppe wrote:


Anything after -run goes to your program not the compiler.

Args to the compiler must be before -run.


Thanks for the reply. Got the point now. :)




Re: Documentation generator is not working

2021-09-02 Thread Adam D Ruppe via Digitalmars-d-learn
On Thursday, 2 September 2021 at 17:20:55 UTC, Vinod K Chandran 
wrote:

"dmd -run test.d -D"


Anything after -run goes to your program not the compiler.

Args to the compiler must be before -run.


Re: Documentation generator is not working

2021-09-02 Thread Vinod K Chandran via Digitalmars-d-learn

On Thursday, 2 September 2021 at 16:26:19 UTC, jfondren wrote:



What commands are you running? What you describe doing, works:

```


$ dmd -D file

$ w3m -dump file.html|grep -A1 function
A sample function. Let's check what we will get in 
documentation. abc - A

simple string

$ rm -fv file.html
removed 'file.html'

$ dmd -D file

$ w3m -dump file.html|grep -A1 function
A sample function. Let's check what we will get in 
documentation. abc - A

simple string
$
```


Thanks for the reply. My command was the problem. I repeatedly 
used

"dmd -run test.d -D"
But now, I can see the html file when I use this -- "dmd -D 
test.d".




Re: Documentation generator is not working

2021-09-02 Thread jfondren via Digitalmars-d-learn
On Thursday, 2 September 2021 at 16:20:32 UTC, Vinod K Chandran 
wrote:

Hi all,
I am playing with ddoc. I wrote this code--
```d
import std.stdio : log = writeln;

void main() {
log("Experimenting with dDoc");
}

/// A sample function.
/// Let's check what we will get in documentation.
/// abc - A simple string
void sample(string abc) {log(abc);}
```
And then, compile it with "-D" switch. At first, I saw an html 
file is generated. But I deleted it and compiled again. This 
time, no html file is generated. What's wrong with this ?


What commands are you running? What you describe doing, works:

```
$ cat file.d
import std.stdio : log = writeln;

void main() {
log("Experimenting with dDoc");
}

/// A sample function.
/// Let's check what we will get in documentation.
/// abc - A simple string
void sample(string abc) {log(abc);}

$ dmd -D file

$ w3m -dump file.html|grep -A1 function
A sample function. Let's check what we will get in 
documentation. abc - A

simple string

$ rm -fv file.html
removed 'file.html'

$ dmd -D file

$ w3m -dump file.html|grep -A1 function
A sample function. Let's check what we will get in 
documentation. abc - A

simple string
$
```


Documentation generator is not working

2021-09-02 Thread Vinod K Chandran via Digitalmars-d-learn

Hi all,
I am playing with ddoc. I wrote this code--
```d
import std.stdio : log = writeln;

void main() {
log("Experimenting with dDoc");
}

/// A sample function.
/// Let's check what we will get in documentation.
/// abc - A simple string
void sample(string abc) {log(abc);}
```
And then, compile it with "-D" switch. At first, I saw an html 
file is generated. But I deleted it and compiled again. This 
time, no html file is generated. What's wrong with this ?