@param

D

Daz

Hi everyone.

Sorry for the meaningless subject. I honestly didn't know what to put.
I have noticed a lot of scripts these days seem to have something like
this:
/**
* Function description
* @param {object} p1: first parameter
* @param {object} p2: 2nd parameter
*/

I know the above might not be entirely correct, but I hope you get the
idea.

My IDE seems to support this quite well, and has functionality to help
tell me what functions do when I hover over them with my mouse. My
question is, what is this form of commenting known as? If I know what
its called, I can look into it, and hopefully make good use of it.

Many thanks.

Daz.
 
R

Randy Webb

Daz said the following on 1/20/2007 6:08 PM:
Hi everyone.

Sorry for the meaningless subject. I honestly didn't know what to put.
I have noticed a lot of scripts these days seem to have something like
this:
/**
* Function description
* @param {object} p1: first parameter
* @param {object} p2: 2nd parameter
*/

I know the above might not be entirely correct, but I hope you get the
idea.

My IDE seems to support this quite well, and has functionality to help
tell me what functions do when I hover over them with my mouse. My
question is, what is this form of commenting known as? If I know what
its called, I can look into it, and hopefully make good use of it.

It probably got started with Sun and Java. If not, it got copied from
elsewhere. It seems to, at least, be a form of JAVA documentation used
by Sun and probably copied to other languages - or vice versa:

<URL: http://java.sun.com/j2se/javadoc/writingdoccomments/>
 
D

Daz

Randy said:
Daz said the following on 1/20/2007 6:08 PM:

It probably got started with Sun and Java. If not, it got copied from
elsewhere. It seems to, at least, be a form of JAVA documentation used
by Sun and probably copied to other languages - or vice versa:

<URL: http://java.sun.com/j2se/javadoc/writingdoccomments/>
Aha. That makes sense. Now I have somewhere to start my research as
Googling for "@param", seems to strip the "@" symbol.

Thank you for your input, Randy.

Daz.
 
R

Randy Webb

Daz said the following on 1/20/2007 7:06 PM:
Aha. That makes sense. Now I have somewhere to start my research as
Googling for "@param", seems to strip the "@" symbol.

A Google search for "@param" is precisely how I found that page though.
 
D

Daz

Matt said:
Probably for use with jsdoc: http://jsdoc.sourceforge.net/

Thanks for that Matt. Ironically enough, I managed to find the jsdoc
site about an hour before your post. I spent 3AM-5AM this morning
reading the documentation and playing with jsdoc. It's really quite
good, and it's surprisingly fast. :)
 
D

Daz

Matt said:
Probably for use with jsdoc: http://jsdoc.sourceforge.net/

I see you use jsdoc on http://www.AjaxToolbox.com. Very nice
XMLHttpRequest Library. I am reading the docs now, and will most likely
use it. I have seen lots of libraries around such as dojo, prototype,
scriptaculous and the likes, but I have never seen a standalone
XMLHttpRequest object, which is what I have been looking for, for some
time. Would you be able to recommend a good,compact, and easy to use
JavaScript library such as one that I have named above? I can't decide
on which to use, if any.

Thanks.
 
M

Matt Kruse

Daz said:

My own customized version of jsdoc, yes. :)
I have seen lots of libraries around such as dojo,
prototype, scriptaculous and the likes, but I have never seen a
standalone XMLHttpRequest object, which is what I have been looking
for, for some time. Would you be able to recommend a good,compact,
and easy to use JavaScript library such as one that I have named
above? I can't decide on which to use, if any.

Which js lib to use, if any, is a religious war!

I have my own stand-alone libraries that perform specific tasks at
http://www.JavascriptToolbox.com/
Of the general libs out there, I prefer jQuery and MooTools.
I'm currently working on my own general-purpose library that will have
similar functionality to the popular libs out there, but in a better syntax,
without any attempt to make OO in js work like some other language, and with
some cool features and behavior that I think is missing in current libs.
Hopefully a test version will be out in a few weeks at
http://www.JavascriptElements.com/ (which currently just redirects to my
site above).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top