Hi, Everyone. This is @neko9!!
Today we will study the program structure.
*It's an important concept that cannot be avoided when coding.
In this case, the two structures are "Reentrant" and "Recursive".
①Reentrant
It is a program structure that can be called by multiple tasks simultaneously and return the correct result for each of them.
This is achieved by sharing the procedural part with multiple tasks and preparing the data part for each task unit.
Unn... some of you may not be familiar with it, so let's look at a simple illustration of how it's implemented!
It is often the act of grouping identical processes together when you do your own coding.
②Recursive
It is about a structure that can call itself and return the correct result.
With each call to itself, the local variables must be renewed and made independent of the previous ones.
Oh, it's getting a little confusing, isn't it?
Don't worry, let's take a look at the illustration.
It may be easy to see that the data is once saved to the stack.
Well, how was it?
As for me, I thought it was easy to understand, but difficult! But it's surprisingly easy when you actually try coding : )
See you in the next Today's Study!
@neko9 さん、こんにちは。
@japansteemitがこの記事をアップボートしました。
tomoyan.witnessに投票お願いします👇
https://steemitwallet.com/~witnesses
💡 アップボートガイド 💡
分からない事は何でも質問して下さい🙇
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit