Gus Wirth wrote:
Please explain your concept of a pointer. To me it is a reference to a
memory location like in C.
You mean, in your implementation of C. How about "near" vs "far"
pointers? How about pointers in a C interpreter? How about pointers in a
sandboxed C? How about pointers when you're running in
virtually-addressed memory, like most desktop computers use?
int* x;
This does not define a reference to a memory location. It may hold a
number that refers to something that's actually on disk, for example,
because it happens to be paged out.
As a programmer you can abuse it at will.
Well, no, you can't. Not in C. Maybe your C compiler allows that, but
that's not the C language. That's just your compiler.
{ int x[10]; int* y;
y = x;
y += 12; /* C standard says this line can crash your program */
}
--
Darren New / San Diego, CA, USA (PST)
It's not feature creep if you put it
at the end and adjust the release date.
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg