Why use an "if" statement to encapsulate a block of code?
Show older comments
I notice that many users encapsulate their code inside an if statement such as
if true
...
(code)
...
end
What is the purpose for this? Is it variable scoping?
2 Comments
Bob Thompson
on 2 Mar 2018
Are you talking about here on the forums? They do that simply because when you push the "{}Code" button it pops up that stuff automatically.
Jim Riggs
on 2 Mar 2018
Accepted Answer
More Answers (0)
Categories
Find more on Historical Contests in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!