# Bit() correct syntax

**URL:** <https://forum.arduino.cc/t/bit-correct-syntax/1240790>\
**Category:** Programming\
**Created:** [March 27, 2024, 10:22pm UTC](https://forum.arduino.cc/t/bit-correct-syntax/1240790 "2024-03-27T22:22:25Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![GolamMostafa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/golammostafa/32/239011_2.png) [@GolamMostafa](https://forum.arduino.cc/u/GolamMostafa)\
**Post date:** [March 28, 2024, 5:39pm UTC](https://forum.arduino.cc/t/bit-correct-syntax/1240790/28 "2024-03-28T17:39:28Z")

</div>

> [@Delta\_G](#):
>
> byte x = bit(0), y;

Now, I understand why the above line was not being compiled. The above line is a one-line form of:

```arduino
byte x = bit(0); //initialization
byte y; //declaration

```

But, y was already declared; so, the error message was valid.

Thanks for giving time to explain it.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 24, 2024, 5:40pm UTC](https://forum.arduino.cc/t/bit-correct-syntax/1240790/29 "2024-09-24T17:40:14Z")

</div>

Closed on September 24, 2024, 5:40pm UTC

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

[Previous page](https://forum.arduino.cc/t/bit-correct-syntax/1240790.md?page=1)
