Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: I'm trying to consolidate my functions into subroutines

by hippo (Bishop)
on May 17, 2017 at 08:09 UTC ( [id://1190446]=note: print w/replies, xml ) Need Help??


in reply to Re^4: I'm trying to consolidate my functions into subroutines
in thread I'm trying to consolidate my functions into subroutines

Is there really any formal distinction here in any language?

Certainly in Fortran at least there is. The declarative statements FUNCTION and SUBROUTINE define two different types of subprogram. The former returns a value and is invoked like

X = SIN(Y)

whereas the latter does not and is invoked like

CALL RANDOM_NUMBER(A)

They serve distinct purposes. HTH.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1190446]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-19 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found