inclusive-lower-bound, exclusive-upper-bound (was Re: Range Operation pre-PEP)

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Thu May 17 17:00:49 EDT 2001


Thu, 17 May 2001 09:06:35 GMT, greg jorgensen <greg at C800000-A.potlnd1.or.home.com> pisze:

> Since you're designing your own language I'm going to get a little
> pedantic on you.

Let me be pedantic too.

> * Pointers are modifiable l-values, array names are not.

Pointers are not necessarily l-values. For example witn this declaration:
    int i;
&i is a pointer but not l-value.

> * The address of an array is known at compile time, but the value of a
> pointer is not known until run time.

After
    int (*a)[10], i;
a[i] is an array whose address is not known at compile time.

> * An array definition implicitly allocates memory for the array elements.
> A pointer definition/declaration does not allocate any memory.

It allocates memory for the pointer itself.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list