Question: Module Example - A simple procedure in a module - Request

Dear users,

Can any one give a correct model statement (if what I have suggested is incorrect) for each one of the following in a module:

module() export eseq;  local lseq;  global gseq;  option optseq; 

 description dseq;  uses usesSequence;  statementSequence   end

My model statements:

export x1, y1;

# x1 and y1 are variables calculated here and sent to main document

 local a, b;  

# a and b are local constants are variables used here inside module only


global z1; 

# z1 is a constant or variable used all over the document can be read from and exported to main document and used in manipulation anywhere in the main document as well as inside the module.

option if x1 = .. else... end; 

 description dseq;

# Statements for self use and understanding the commands during execution

 usesSequence;

uses DocumentTools;

# Packages used in module like DocumentTools, Students Calculus

Statement Sequence

valid executable maple command  1

valid executable maple command  last

 

I want to understand the basic usage of  a module and procedure with a simple document.  

I am also confused over the following.


1) Is there any use of a module with zero statement (as given below) in it?

 module ()

end module

2) What is the major difference between module and procedure?

3) What is in module that is not possible in procedure?
I believe that procedure is like a function [for call from script(internally or eternally) or command window] in MATLAB and subroutine in FORTRAN or BASIC etc. What is module like in other programme siftwares?

Thanks for helping.

Ramakrishnan V


 

Please Wait...