Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function(#) 2

Status
Not open for further replies.

Kirsle

Programmer
Joined
Jan 21, 2006
Messages
1,179
Location
US
I see this all over the place in the Perl community, where a function name and then a number is listed. Example:

Code:
getcwd

    my $cwd = getcwd();

Returns the current working directory.

Re-implements the [COLOR=red]getcwd(3)[/color] ([COLOR=red]or getwd(3)[/color]) functions in Perl.

and also from perlopentut

Code:
SEE ALSO ^

The open and sysopen functions in [COLOR=red]perlfunc(1)[/color]; the system [COLOR=red]open(2), dup(2), fopen(3), and fdopen(3)[/color] manpages; the POSIX documentation.

I've always been just ignoring the numbers because the function name part of it seems pretty self-explanatory, but what do the numbers mean?

-------------
Kirsle.net | Kirsle's Programs and Projects
 
They refer to the section in the Unix man pages where those functions can be found.
 
Ishnid: What unix man pages? What section of these man pages? Can you demonstrate what you're talking about?
 
Please Ishnid, will You demonstrate what you're talking about?

As I am new to Unix. I was a windows user.So I am kinda relearning My way

MA WarGod

I believe if someone can think it, it can be programmed
 
KevinADC said:

Ahh ... thanks Kevin.

So by section, what they are really talking about is category of man pages. From that website:

* Section 1 - User Commands
* Section 2 - System Calls
* Section 3 - Subroutines
* Section 4 - File Formats
* Section 5 - Miscellaneous
* Section 6 - Games
* Section 7 - Special Files
* Section 8 - System Administration
* Section l - Local
* Section n - New (TCL)

This is nice to be exposed to, but I can't see how this really is relevant to the navigation of the man pages. Except in a very cursory way.
 
Yes, it is broad and general, as you can see lumped into general categories. Mostly for techie types.

- Kevin, perl coder unexceptional!
 
Aha, this is useful, under Subroutines there are all the Tk_ things, which I've seen a lot of in the Tk module pages, like "takes any valid argument that is accepted by Tk_GetPixels" but couldn't find where Tk_GetPixels was ever talked about anywhere. I think I'm gonna bookmark this, I've seen some Tk_Get* things that are less than self-explanatory.

-------------
Cuvou.com | The NEW Kirsle.net
 
Apologies for the terse reply yesterday - I was just heading home.

It's possible to be looking for a manpage for which there are similarly-named pages in other sections. For example on my system:

man open (brings up openvt(1))
man 1 open (does the same)
man 2 open (brings up open(2), which is C's "open" function)
man 3 open (brings up open(3perl), which is Perl's "open" function).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top