9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Rob Pike <robpike@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] acid question
Date: Fri,  7 Jan 2005 21:41:22 -0800	[thread overview]
Message-ID: <7359f04905010721411d96535e@mail.gmail.com> (raw)
In-Reply-To: <Pine.BSI.4.58.0501071729460.10670@malasada.lava.net>

Acid can be surprising.

acid; c=a>b
acid; whatis c
integer variable format D
acid; c=a<b
acid; whatis c
integer variable format X

This at least can be fixed by putting
	res->store.fmt = 'D';
in a number of places in src/cmd/acid/expr.c analogous
to its placement in ogt().

-rob


On Fri, 7 Jan 2005 17:36:17 -1000 (HST), Tim Newsham <newsham@lava.net> wrote:
> I have two variables, "a" and "b".  One comes from a symbol name
> (ie: a = main), and the other comes from data returned from strace().
> Normal stuff:
> 
>     print       shows
>     -----------------------------
>     a           0x800529a4
>     b           0x800529a4
>     whatis a    integer variable format X
>     whatis b    integer variable format X
>     a - b       0x00000000
>     b - a       0x00000000
> 
> now weirdness:
>     a == b      0
>     a < b       0x00000001
>     b < a       0x00000000
>     a > b       0
>     b > a       1
> 
> Whats going on here?  Signed vs. unsigned issues?
> 
> Tim N.
>


  reply	other threads:[~2005-01-08  5:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-08  3:36 Tim Newsham
2005-01-08  5:41 ` Rob Pike [this message]
2005-01-08  6:34   ` Tim Newsham
2005-01-08 21:46 ` Tim Newsham
2010-07-17  8:33 Skip Tavakkolian
2010-07-17  8:48 ` EBo
2010-07-17  9:19   ` Skip Tavakkolian
2010-07-17 12:15     ` EBo
2010-07-17 15:00 ` Philippe Anel
2010-07-17 15:56   ` Philippe Anel
2010-07-17 16:46     ` cinap_lenrek
2010-07-17 16:48     ` cinap_lenrek
2010-07-17 17:23     ` Skip Tavakkolian
2010-07-17 17:58       ` Philippe Anel

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=7359f04905010721411d96535e@mail.gmail.com \
    --to=robpike@gmail.com \
    --cc=9fans@cse.psu.edu \
    /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 NNTP newsgroup(s).