public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Dominique d'Humières" <dominiq@lps.ens.fr>
To: martintrucco8@hotmail.com
Cc: gfortran <fortran@gcc.gnu.org>
Subject: Re: Fortran Problems
Date: Wed, 21 Mar 2018 18:36:00 -0000	[thread overview]
Message-ID: <3D789446-0E19-4A59-AC66-EA27EC6B8B65@lps.ens.fr> (raw)

Hi Martin,

> Hi! l installed Fortran on my computer and I wanted to do 32767+1 with Integer(2)
>  [to see that this exercise will be -32768] but Ubuntu said that I have an overflow error.

This has nothing to do with Ubuntu. Computing 32767+1 with Integer(2) is invalid in Fortran.

> PD: I don't know how can I disable the option '-fno-range-check' and internet couldn't help me

If nevertheless you still want to compute 32767+1 with Integer(2), you can do it (and get -32768) by enabling (not disabling)  the option '-fno-range-check’ .

Cheers,

Dominique


             reply	other threads:[~2018-03-21 18:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 18:36 Dominique d'Humières [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-03-21 18:20 Martin Trucco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D789446-0E19-4A59-AC66-EA27EC6B8B65@lps.ens.fr \
    --to=dominiq@lps.ens.fr \
    --cc=fortran@gcc.gnu.org \
    --cc=martintrucco8@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).