Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: Mathew Yeates <mat.yeates@gmail.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: doing a comparison in python
Date: Tue, 17 Aug 2010 00:26:00 -0000	[thread overview]
Message-ID: <4C69D737.1080200@vmware.com> (raw)
In-Reply-To: <AANLkTikmdenrWhVsQw1oYsb8Ohq0mTFs3=b3tr3DKnW-@mail.gmail.com>

Mathew Yeates wrote:
> Hi
> I am debugging fortran code and I want to see if an interior value is
> equal to .FALSE.
> I know how to get the value with parse_and_eval but what do I do with it?

Can we assume this value is an integer?
Then you should be able to do something like this:

    long foo = value_as_long (parse_and_eval (my_value));

    if (foo == 0)
       [...];


  reply	other threads:[~2010-08-17  0:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17  0:19 Mathew Yeates
2010-08-17  0:26 ` Michael Snyder [this message]
2010-08-17  0:35   ` Mathew Yeates
2010-08-17  1:40     ` Thiago Jung Bauermann
2010-08-17 10:59       ` Paul Koning
2010-08-17 16:24       ` Tom Tromey

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=4C69D737.1080200@vmware.com \
    --to=msnyder@vmware.com \
    --cc=gdb@sourceware.org \
    --cc=mat.yeates@gmail.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