# Is there a good tutorial on Procedural Programming?

**URL:** <https://community.wolfram.com/t/is-there-a-good-tutorial-on-procedural-programming/10506>\
**Category:** Questions\
**Tags:** game-development, software-development\
**Created:** [May 9, 2017, 11:08pm UTC](https://community.wolfram.com/t/is-there-a-good-tutorial-on-procedural-programming/10506 "2017-05-09T23:08:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![billnormal](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/billnormal/32/8911_2.png) [@billnormal](https://community.wolfram.com/u/billnormal)\
**Post date:** [May 9, 2017, 11:08pm UTC](https://community.wolfram.com/t/is-there-a-good-tutorial-on-procedural-programming/10506/1 "2017-05-09T23:08:51Z")

</div>

I still consider myself new with Wolfram programming, I’ve been teaching myself wolfram for about six months now and I’ve got a few programs to do stuff when I hit shift enter. Now I’ve been tasked to make a program that basically monitors a variable and run a command when the threshold is passed i.e. when water level rises past 10inches count one instance and record it (the water level varies inconsistently). I found dynamic and do and if and else and while, but I can’t seem to wrap my head around the procedural programming from the documentation itself. I can get a dynamic monitor function. The problem with while is that it stops evaluating after the condition has been met & the wording in the Loops and Control Structures documentation is tooooo confusing for my brain.

Is there a good tutorial video I can watch or is there someone out there that I could connect with to get this programming language into my brain? Or something simpler I could grasp, or a page with different wording? or anything helpful that you guys know of?

Long story short I want my program to monitor a condition, and run the “count” function once when the condition is satisfied. I feel like running the monitor function dynamically is a good start, but I don’t know how to ‘knock down the rest of the dominoes’ one time, when the dynamic condition turns true.

Thanks in advance ladies and gentlemen.

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [May 10, 2017, 11:16am UTC](https://community.wolfram.com/t/is-there-a-good-tutorial-on-procedural-programming/10506/2 "2017-05-10T11:16:40Z")

</div>

Have a look at the functionality described here: [https://reference.wolfram.com/language/guide/TimedEvaluations.html](https://reference.wolfram.com/language/guide/TimedEvaluations.html) So you can execute repeatedly a piece of code over time, without hogging all your cpu cycles by using a while loop or so…

---

<div class="post-metadata">

**Author:** ![arnobosse](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@arnobosse](https://community.wolfram.com/u/arnobosse)\
**Post date:** [May 10, 2017, 12:15pm UTC](https://community.wolfram.com/t/is-there-a-good-tutorial-on-procedural-programming/10506/3 "2017-05-10T12:15:53Z")

</div>

More broadly (these are textbooks, not tutorials), you may want to look at Mangano’s (somewhat dated, but still useful) [Mathematica Cookbook](http://shop.oreilly.com/product/9780596521004.do) and Wellin’s more recent [Programming with Mathematica](http://www.cambridge.org/de/academic/subjects/computer-science/scientific-computing-scientific-software/programming-mathematica-introduction?format=HB) (see also his other books on [http://www.programmingmathematica.com/books.html](http://www.programmingmathematica.com/books.html)).
