Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1627

Re: [] [] eq apparently returns true

From Scott Hemphill <hemphill@hemphills.net>
Newsgroups comp.lang.postscript
Subject Re: [] [] eq apparently returns true
References <15de7a17-f979-4fe5-ac27-7215f68a4df6@googlegroups.com>
Date 2013-09-18 22:50 -0400
Message-ID <m338p1ttgs.fsf@hemphills.net> (permalink)

Show all headers | View raw


anavi8r@gmail.com writes:

> Hi all,
>
> I am writing a PostScript interpreter and I just ran into the following strange issue: 
>
> Apparently, a "standard" PostScript interpreter such as Photoshop, when running into the code
>
> [] [] eq
>
> returns true (which is unexpected), while the code
>
> [1] [1] eq 
>
> or
>
> [] [1] eq
>
> return false (which is expected.)
>
> Why would two empty arrays considered equal? Shouldn't they still occupy different areas of the VM?

Because empty arrays don't use any VM.  The pointer into the VM is null.

Scott
-- 
Scott Hemphill	hemphill@alumni.caltech.edu
"This isn't flying.  This is falling, with style."  -- Buzz Lightyear

Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[] [] eq apparently returns true anavi8r@gmail.com - 2013-09-18 10:16 -0700
  Re: [] [] eq apparently returns true Scott Hemphill <hemphill@hemphills.net> - 2013-09-18 22:50 -0400
    Re: [] [] eq apparently returns true luser- -droog <mijoryx@yahoo.com> - 2013-09-18 22:28 -0700
      Re: [] [] eq apparently returns true luser- -droog <mijoryx@yahoo.com> - 2013-09-18 22:35 -0700
      Re: [] [] eq apparently returns true Mark Carroll <mtbc@bcs.org> - 2013-09-19 08:28 +0100
        Re: [] [] eq apparently returns true luser- -droog <mijoryx@yahoo.com> - 2013-09-19 02:06 -0700
          Re: [] [] eq apparently returns true luser- -droog <mijoryx@yahoo.com> - 2013-09-19 02:25 -0700
        Re: [] [] eq apparently returns true luser- -droog <mijoryx@yahoo.com> - 2013-09-19 02:38 -0700
    Re: [] [] eq apparently returns true anavi8r@gmail.com - 2013-09-21 11:28 -0700
      Re: [] [] eq apparently returns true luser- -droog <mijoryx@yahoo.com> - 2013-09-21 12:30 -0700
        Re: [] [] eq apparently returns true Scott Hemphill <hemphill@hemphills.net> - 2013-09-23 23:24 -0400

csiph-web