Tuesday, April 14, 2026

Structured Programming

Procedure  

- A block of code that performs a task.  

- Does not return a value. 

PROCEDURE Name()

   // statements

ENDPROCEDURE

Function 

- A block of code that performs a task.  

- Returns a value.  

FUNCTION Name() RETURN <data type>

   // statements

ENDFUNCTION

Key Difference:  

- Use a procedure when you just want to execute instructions.  

- Use a function when you need to calculate and return a result.  

No comments:

Folk Arts of India

Madhubani Painting   - Region: Mithila, Bihar   - Period: Ancient (references from Ramayana)   - Artists: Traditionally, women   - Themes...