# Add a dot after the number

**URL:** <https://community.freefem.org/t/add-a-dot-after-the-number/1750>\
**Category:** General Discussion\
**Created:** [May 18, 2022, 1:40am UTC](https://community.freefem.org/t/add-a-dot-after-the-number/1750 "2022-05-18T01:40:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qianrui](https://avatars.discourse-cdn.com/v4/letter/q/9fc348/32.png) [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Post date:** [May 18, 2022, 1:40am UTC](https://community.freefem.org/t/add-a-dot-after-the-number/1750/1 "2022-05-18T01:40:49Z")

</div>

Add a dot after the number. Why? Some numbers are followed by a dot, others are not. In any case, it is necessary to add a dot.

> complex[int] A(2.+0i:10.0+0i);  
> real[int] A(2:10);  
> real[int] A(2.:10.);

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [May 18, 2022, 1:48pm UTC](https://community.freefem.org/t/add-a-dot-after-the-number/1750/2 "2022-05-18T13:48:24Z")

</div>

A number we a dot is a real and without une dot is integer;

but all number bool, integers real can be casted automatically in a other type, so generally  
you have no problem.

---

<div class="post-metadata">

**Author:** ![Qianrui](https://avatars.discourse-cdn.com/v4/letter/q/9fc348/32.png) [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Post date:** [May 19, 2022, 2:15am UTC](https://community.freefem.org/t/add-a-dot-after-the-number/1750/3 "2022-05-19T02:15:19Z")

</div>

> [@frederichecht](#):
>
> but all number bool, integers real can be casted automatically in a other type, so generally  
> you have no problem.

OK, I understand. Thank you for your reply. 😃

---

<div class="post-metadata">

**Author:** ![Qianrui](https://avatars.discourse-cdn.com/v4/letter/q/9fc348/32.png) [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Post date:** [May 19, 2022, 2:31am UTC](https://community.freefem.org/t/add-a-dot-after-the-number/1750/4 "2022-05-19T02:31:34Z")

</div>

> func k = 1.8\*(y\<0.5) + 0.2;  
> func k=1.8\*(y)+0.2;  
> What’s the difference between the two?

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [May 25, 2022, 5:13pm UTC](https://community.freefem.org/t/add-a-dot-after-the-number/1750/5 "2022-05-25T17:13:30Z")

</div>

(y\<0.5) is 0 is y \>=0.5 and 1 otherwise so it is really different.

---

<div class="post-metadata">

**Author:** ![Qianrui](https://avatars.discourse-cdn.com/v4/letter/q/9fc348/32.png) [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Post date:** [May 26, 2022, 1:16am UTC](https://community.freefem.org/t/add-a-dot-after-the-number/1750/6 "2022-05-26T01:16:42Z")

</div>

> [@frederichecht](#):
>
> (y\<0.5) is 0 is y \>=0.5 and 1

> (y\<0.5) is 0 is y \>=0.5 and 1  
> Hello, professor. In fact, I don’t understand. 😂
