[mercury-users] seek_binary

Richard A. O'Keefe ok at cs.otago.ac.nz
Wed Nov 13 11:41:16 AEDT 2002


"Noel  Pinto" <cool4life at rediffmail.com> wrote:

	offset means counteract, compensate, counterbalance.

Well, no.  It doesn't.

To quote a dictionary I happen to have handy,
    "If one quantity or amount is offset by another quantity or
     amount, the two quantities or amounts are made to balance,
     so that an advantage or disadvantage is cancelled out."
     
The key idea here is SUBTRACTION.  
http://www.webster.com/ (not my favourite dictionary by a LONG way,
but you can look things up free, which is more than you can do with
my preferred dictionaries) has

    "1 a archaic: [see] OUTSET, START
       b [see] CESSATION
     2 a 1: a short prostrate lateral shoot arising from the base
            of a plant [to me this is only an offshoot, not an offset]
         2: a small bulb arising from the base of another bulb
       b  : a lateral or collateral branch (as of a family or race)
            [see] OFFSHOOT
       c  : a spur from a range of hills
     3 a  : a horizontal ledge on the face of a wall formed by a
            diminution of its thickness above
---->  b  : [see] DISPLACEMENT
---->  c  : an abstruct change in the dimension or profile of an
            ofbject or the part set off by such a change
     4    : something that sets off to advantage or embellishes
            something else : [see] FOIL
     5    : an abrupt bend in an object by which one part is turned
	    aside out of line [the *purpose* of such a bend is to
--->        effect a DIFFERENCE in position]
     6    : something that serves to counterbalance or compensate for
	    something else, especially : either of two balancing ledger
--->        items [again, the core idea is a DIFFERENCE in some measurement
	    made to change some position into a preferred position]
     7 a  : unintended transfer of ink (as from a freshly printed sheet)
	    [again, a CHANGE of position]
       b  : a printing processin which an inked impression from a plate
            is first made on a rubber-blanketed cylinder and then
            transferred to the paper being printed."

The core idea behind most of these senses is a DIFFERENCE or CHANGE
in some some physical dimension, typically a length of some kind,
in order to set something off to a preferred position.

	What I understand is here it means a position in the stream.

No, it doesn't.  The offset argument is a *DIFFERENCE* from a position.

	So, tell me what is the need for mentioning it as an offset??
	
Because
(a) This is basically a thin wrapper around fseek() or lseek(), and the
    official standards for fseek() (ISO C) and lseek() (IEEE POSIX)
    call the argument an offset.
(b) It *IS* an offset, a change in position.  The 'whence' argument
    specifies an origin (the begining of the file, the current position,
    or the end of the file) and the 'offset' argument specifies a
    DIFFERENCE from that origin.

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list