Procedure and Recursion

Let us first take the advanced control structure Procedure.

1 Procedure

Among a number of terms that are used, in stead of procedure, are subprogram and even function. These terms may have shades of differences in their usage in different programming languages. However, the basic idea behind these terms is the same, and is explained next.

It may happen that a sequence frequently occurs either in the same algorithm repeatedly in different parts of the algorithm or may occur in different algorithms. In such cases, writing repeatedly of the same sequence, is a wasteful activity. Procedure is a mechanism that provides a method of checking this wastage.

पहले हम उन्नत नियंत्रण संरचना प्रक्रिया लेते हैं।

1 प्रक्रिया

प्रक्रिया के स्थान पर उपयोग किए जाने वाले कई पदों में उपप्रोग्राम और यहां तक ​​कि समारोह भी हैं। इन शब्दों में भिन्न प्रोग्रामिंग भाषाओं में उनके इस्तेमाल में मतभेद के रंग हो सकते हैं। हालांकि, इन शब्दों के पीछे मूल विचार समान है, और आगे समझाया गया है।

ऐसा हो सकता है कि एक अनुक्रम प्रायः एल्गोरिदम के विभिन्न भागों में बार-बार एक ही एल्गोरिथ्म में होता है या भिन्न एल्गोरिदम में हो सकता है। ऐसे मामलों में, एक ही अनुक्रम के बार-बार लेखन, एक बेकार की गतिविधि है। प्रक्रिया एक तंत्र है जो इस अपव्यय को जांचने की एक विधि प्रदान करता है।

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

error: Content is protected !!