cgm225 Posted August 25, 2008 Share Posted August 25, 2008 How should I include my name as author with a class? Is there a certain syntax/format for adding my name to the top of a script file which I have authored? Link to comment https://forums.phpfreaks.com/topic/121302-how-should-i-include-my-name-as-author-with-a-class/ Share on other sites More sharing options...
Ken2k7 Posted August 25, 2008 Share Posted August 25, 2008 I don't know what difference it would make, but in PHP and Java as far as I know, you can do this: /** * @author Ken2k7 */ I don't think there is one in JavaScript. But it doesn't make much of a difference. Link to comment https://forums.phpfreaks.com/topic/121302-how-should-i-include-my-name-as-author-with-a-class/#findComment-625377 Share on other sites More sharing options...
cgm225 Posted August 25, 2008 Author Share Posted August 25, 2008 Are there any other @ fields I should include? Is there a convention to this? Link to comment https://forums.phpfreaks.com/topic/121302-how-should-i-include-my-name-as-author-with-a-class/#findComment-625385 Share on other sites More sharing options...
Mchl Posted August 25, 2008 Share Posted August 25, 2008 Depends on documenting program you use I suppose. Documenting convention should be consistend across your project, that's for sure. I use doxygen, and for documenting classes I use at least these two @author @version Link to comment https://forums.phpfreaks.com/topic/121302-how-should-i-include-my-name-as-author-with-a-class/#findComment-625390 Share on other sites More sharing options...
Ken2k7 Posted August 25, 2008 Share Posted August 25, 2008 Are there any other @ fields I should include? Is there a convention to this? The way I had is the convention. There are other "@" fields, but one for author. Link to comment https://forums.phpfreaks.com/topic/121302-how-should-i-include-my-name-as-author-with-a-class/#findComment-625412 Share on other sites More sharing options...
DarkWater Posted August 25, 2008 Share Posted August 25, 2008 I use phpDoc syntax for documenting classes and functions. Link to comment https://forums.phpfreaks.com/topic/121302-how-should-i-include-my-name-as-author-with-a-class/#findComment-625415 Share on other sites More sharing options...
Adam Posted August 25, 2008 Share Posted August 25, 2008 to be honest i don't think it really matters that much. so long as people get the information it doesn't really matter what convention you use. I normally just use something neat and simple, for example: /************************************************/ // @Author: ########################### // @Script: ########################### // @License: ########################### /************************************************/ ... something just to put your mark on it. Add / remove them as you please. only reason i add the @ is purely from seeing so many scripts with it on, became somewhat of a habbit back in the early days after seeing so many scripts with it on... i don't know wether certain software recognises it or not but I can't imagine it really mattering that much... Adam Link to comment https://forums.phpfreaks.com/topic/121302-how-should-i-include-my-name-as-author-with-a-class/#findComment-625433 Share on other sites More sharing options...
trq Posted August 25, 2008 Share Posted August 25, 2008 i don't know wether certain software recognises it or not but I can't imagine it really mattering that much... Take a look at phpDoc, it has a defined syntax and is very usefull for larger projects. Link to comment https://forums.phpfreaks.com/topic/121302-how-should-i-include-my-name-as-author-with-a-class/#findComment-625450 Share on other sites More sharing options...
DarkWater Posted August 25, 2008 Share Posted August 25, 2008 i don't know wether certain software recognises it or not but I can't imagine it really mattering that much... Take a look at phpDoc, it has a defined syntax and is very usefull for larger projects. Yeah, that's what I use. Link to comment https://forums.phpfreaks.com/topic/121302-how-should-i-include-my-name-as-author-with-a-class/#findComment-625454 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.