Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Subroutine definition

Reply
Thread Tools

Subroutine definition

 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      06-11-2004
Bryon Bean wrote:
> I was checking out some modules for introspection and while looking
> at the code for MRP::Introspection I noticed this subroutine
> definition that I've never seen before (well not in perl at least).
> I was wondering if someone could explain to me what it meant?
> TIA...
>
> sub some_function( $ ){
> ...
> }


Read about prototypes in "perldoc perlsub".

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

 
Reply With Quote
 
 
 
 
Bryon Bean
Guest
Posts: n/a
 
      06-11-2004
Hello,

I was checking out some modules for introspection and while looking at the
code for MRP::Introspection I noticed this subroutine definition that I've
never seen before (well not in perl at least). I was wondering if someone
could explain to me what it meant? TIA...

sub some_function( $ ){
....
}

--
________________________________________
In heaven all the interesting people are missing.
--Friedrich Nietzsche


 
Reply With Quote
 
 
 
 
Jim Gibson
Guest
Posts: n/a
 
      06-17-2004
In article <(E-Mail Removed)>, Bryon Bean
<(E-Mail Removed)> wrote:

> Hello,
>
> I was checking out some modules for introspection and while looking at the
> code for MRP::Introspection I noticed this subroutine definition that I've
> never seen before (well not in perl at least). I was wondering if someone
> could explain to me what it meant? TIA...
>
> sub some_function( $ ){
> ...
> }


It declares the subroutine as taking a single scalar as argument. See
"perldoc perlsub" and read about prototypes.

This newsgroup is defunct. Try comp.lang.perl.misc in the future.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time template list definition / Run-time variable type definition Pierre Yves C++ 2 01-10-2008 02:52 PM
use one subroutine's variable value in another subroutine inside a module. king Perl Misc 5 04-29-2007 06:39 AM
Automagic determination of definition based on definition location. Jon Slaughter C++ 4 10-26-2005 05:00 PM
can a class definition inside another class's definition Jianli Shen C++ 1 03-13-2005 06:02 PM
help?: incomplete definition with complete definition in scope Ark C Programming 1 08-07-2004 04:21 PM



Advertisments