DEREFERENCE
\dˈɛɹɛfɹəns], \dˈɛɹɛfɹəns], \d_ˈɛ_ɹ_ɛ_f_ɹ_ə_n_s]\
Sort: Oldest first
-
To access the thing to which a pointer points,i.e. to follow the pointer. E.g. in C, the declarationsint i;int *p = &i;declare i as an integer and p as a pointer to integer. p isinitialised to point at i ("&i" is the address of i - theinverse of "*"). The expression *p dereferences p to yield ias an lvalue, i.e. something which can appear either on theleft of an assignment or anywhere an integer expression isvalid. Thus*p = 17;would set i to 17. *p++ is not the same as i++ however sinceit is parsed as * (p++), i.e. increment p (which would be aninvalid thing to do if it was pointing to a single int, as inthis example) then dereference p's old value.The C operator "->" also dereferences its left hand argumentwhich is assumed to point to a structure or union of whichthe right hand argument is a member.At first sight the word "dereference" might be thought to mean"to cause to stop referring" but its meaning is wellestablished in jargon.
By Denis Howe
Word of the day
basidiomycota
- comprises fungi bearing the spores on basidium: Gasteromycetes (puffballs); Tiliomycetes (comprising orders Ustilaginales (smuts) and Uredinales (rusts)); Hymenomycetes (mushrooms; toadstools; agarics; bracket fungi); in some classification systems considered a division of kingdom comprises fungi bearing spores on a basidium; includes Gasteromycetes (puffballs) Tiliomycetes comprising the orders Ustilaginales (smuts) and Uredinales (rusts) Hymenomycetes (mushrooms, toadstools, agarics bracket fungi).