# What are the true portable or best to define real 4 real 8 integer 4 integer 8, etc?

**URL:** <https://fortran-lang.discourse.group/t/what-are-the-true-portable-or-best-to-define-real-4-real-8-integer-4-integer-8-etc/3197>\
**Category:** Uncategorized\
**Created:** [April 9, 2022, 6:27pm UTC](https://fortran-lang.discourse.group/t/what-are-the-true-portable-or-best-to-define-real-4-real-8-integer-4-integer-8-etc/3197 "2022-04-09T18:27:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [April 9, 2022, 7:18pm UTC](https://fortran-lang.discourse.group/t/what-are-the-true-portable-or-best-to-define-real-4-real-8-integer-4-integer-8-etc/3197/2 "2022-04-09T19:18:14Z")

</div>

There was that discussion in 2020:

> [@Best way to declare a double precision in Fortran?](https://fortran-lang.discourse.group/t/best-way-to-declare-a-double-precision-in-fortran/69/1):
>
> Hi, there is several ways to declare a double precision real in Fortran: real\*8 :: w real(8) :: x real(kind(0d0)) :: y double precision :: z My habits are to use double precision. Is it a good practice ?

@sblionel is pleading for `selected_real_kind()`

Personally, I now use `iso_fortran_env`, which is sufficient for my simple needs (computing on a PC).

---

_[View the full topic](https://fortran-lang.discourse.group/t/what-are-the-true-portable-or-best-to-define-real-4-real-8-integer-4-integer-8-etc/3197)._
