INVOCATION

Invocation mean full of Subroutine or Function. Subroutine and Function are invoke (call) by another procedure through a procedure call. Procedure that calls another procedure is known as caller procedure.

SYNTAX: CALLING OF A SUBROUTINE

<Procedure-name> (Argument)

CALLING OF A FUNCTION

Variable=<procedure-name> (Argument)

FOR EXAMPLE

Computer Sum ()

Percentage= Get percentage ()

EXIT SUB AND EXIT FUNCTION

Exit Sub and Exit function alter the flow of program. They cause immediate exit to any program when this happen, control is then return to the caller (Sub or Function) and the next statement in sequence after the call is executed.

Example: Exit Sub terminates print number when num<0

Private Sub print Number (Num As Integer) if num>=0 then

…………..

Else

Exit Sub

End if

End Sub.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s