# Fluka can implement a 'for loop' ? like C++

**URL:** <https://fluka-forum.web.cern.ch/t/fluka-can-implement-a-for-loop-like-c/6642>\
**Category:** Running and Runtime Errors\
**Created:** [31 October 2024 15:38 UTC](https://fluka-forum.web.cern.ch/t/fluka-can-implement-a-for-loop-like-c/6642 "2024-10-31T15:38:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [4 November 2024 14:31 UTC](https://fluka-forum.web.cern.ch/t/fluka-can-implement-a-for-loop-like-c/6642/2 "2024-11-04T14:31:50Z")

</div>

Dear Tian,

You can define variables with the **#define** card and then use the _Loop_ feature on Flair’s Run/Runs tab to set up separate simulations for the different values.

Cheers,  
David

---

_[View the full topic](https://fluka-forum.web.cern.ch/t/fluka-can-implement-a-for-loop-like-c/6642)._
