# How to make a count loop not loop at all?

**URL:** <https://community.thunkable.com/t/how-to-make-a-count-loop-not-loop-at-all/2336739>\
**Category:** Questions about Thunkable X\
**Created:** [March 22, 2023, 12:43am UTC](https://community.thunkable.com/t/how-to-make-a-count-loop-not-loop-at-all/2336739 "2023-03-22T00:43:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [March 22, 2023, 12:43am UTC](https://community.thunkable.com/t/how-to-make-a-count-loop-not-loop-at-all/2336739/1 "2023-03-22T00:43:47Z")

</div>

This is such a simple question. I tried all possibilities but none of them worked. Doc:

> > Repeat an action the specified number of times  
> > Count with i from [1] to [10] by [1]

[https://x.thunkable.com/copy/c8cc556efd2ca92abd96d8823bc814ab](https://x.thunkable.com/copy/c8cc556efd2ca92abd96d8823bc814ab)  
1, 1, 1 I expected the count loop not to enter but it entered once. When I tried -1 it entered 3 times. First it surprised me then I realized what it was doing. It was decrementing to -1. So if it is 1 to 1 by 1 technically it should not enter the loop at all. I am stuck here. Please help

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 22, 2023, 1:29am UTC](https://community.thunkable.com/t/how-to-make-a-count-loop-not-loop-at-all/2336739/2 "2023-03-22T01:29:20Z")

</div>

Your blocks are:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/6/26e9c49066b154ef26cf7a8d9bf16b7ef722bf0b.png)

Why are you trying to count from 1 to 1? That loop will happen **one** time. If you are trying negative numbers, please post a screenshot of those blocks.

---

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [March 22, 2023, 2:04am UTC](https://community.thunkable.com/t/how-to-make-a-count-loop-not-loop-at-all/2336739/3 "2023-03-22T02:04:36Z")

</div>

Thanks for getting back to me. My question is I don’t want it to loop even once.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/b/cbd60a8bd092971376a042f607e74e8bbd47a3f3.png)  
In this case if #j = 1 I dont want the inner count #i loop making any loops. It should get bypassed. For #j = 2 and above do the loop. Ofcourse I can put a if block and solve the issue. However I want to avoid putting the if block, if count has the capability to skip then that would be ideal. In C++ this is possible.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 22, 2023, 4:47am UTC](https://community.thunkable.com/t/how-to-make-a-count-loop-not-loop-at-all/2336739/4 "2023-03-22T04:47:45Z")

</div>

I understand that you’re wanting to re-create loops from C++. I’m maybe not the best person to help you with this because I don’t do a lot of coding outside of Thunkable. I do understand a basic C++ loop. I just don’t have a lot of experience implementing them.

But I’m curious… is this for a sort or recursion of some other method that requires a loop from 1 to 1 by 1 to **not** fire at all?

---

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [March 22, 2023, 12:25pm UTC](https://community.thunkable.com/t/how-to-make-a-count-loop-not-loop-at-all/2336739/5 "2023-03-22T12:25:07Z")

</div>

> > is this for a sort or recursion of some other method that requires a loop from 1 to 1 by 1 to **not** fire at all?  
> > No, no, let me clarify. There are two points here

1. There is the “from” and the “by”. If I were keep both of them as 1 what value would you put in “to” so that the second loop does not fire?
2. As you can see it is two nested loops. So for the very first value of #j, I dont want the second loop to fire. For all the other value of #j I want it to fire.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [June 20, 2023, 12:26pm UTC](https://community.thunkable.com/t/how-to-make-a-count-loop-not-loop-at-all/2336739/6 "2023-06-20T12:26:05Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
