<sa*************@gmail.comwrote in message
===========
chat far * p;
delete (p);
===========
Can somebody let me know the behaviour of the above code (As per C
standards;irrespective of compiler implementations)
In the bad old days Intel processors had what is known as segmented memory.
Whilst no doubt a great convenience to the electronics engineer, it was a
major nuisance tot he programmer. A segment was up to 64K, and to use blocks
of memory larger than that you had to do all sorts of fancy calculations.
This meant that the fancy calculations slowed down code, so to speed things
up a little PC compilers invented the "far" keyword. A far pointer was fancy
and slow, but could point to bigger regions of memory than normal pointers.
In modern times the far pointer is largely of historical interest only. If
you need to compile code with far pointer, sinple define "far" as a blank or
a comment.
delete is C++ and an extension of free. it is also a perfectly valid name
for a C function, but don't use it, unless you are one of those people who
think it makes a telling point to make your code a nuisance for C++
programmers to call and maintain.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.