TwinCAT meets Project Euler

During the latest COVID lock down, scrolling randomly through the internet, I stumbled on Project Euler, a series of mathematical/computer programming problems. A while back I solved a Google code jam challenge with Structured Text. So I thought it would be fun to try a few challenges with Structured Text. This also gave me the opportunity to try Jacob’s open source unit test library TcUnit.

After completing the first 2 challenges it occurred to me that it might be fun to publish a repo on Github with this project, to see if I can get more people to solve challenges and on the fly creating a lot of mathematical Structured Text example code.

You help is wanted

If everybody who reads this, solves one open challenge. We should have a cool database of Structured Text in no time.

I’m convinced, how should I start

Awesome! Follow these steps:

  1. Read the read me of the repo.
  2. Clone the repository.
  3. Pick your problem.
  4. Implement your solution in Structured Text.
  5. Test your solution.
  6. File a pull request (or back to step 4 if the test fails :-)).

Some final words

As mentioned this is just an experiment for fun, but it would be cool to build mathematical Structured Text library.

I appreciate all help, suggestion and remarks!

Happy coding!


Gerhard Barteling

Gerhard is a mechatronic engineer with a predilection for software engineering.