Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ns.uoregon.edu!milton!seymour From: seymour@milton.u.washington.edu (Richard Seymour) Newsgroups: comp.lang.fortran Subject: Re: pointers in MIPS Fortran? Message-ID: <1991May16.215418.1021@milton.u.washington.edu> Date: 16 May 91 21:54:18 GMT References: <1991May15.162734@IASTATE.EDU> <1991May16.214854.29357@milton.u.washington.edu> Organization: University of Washington, Seattle Lines: 26 In article <1991May15.162734@IASTATE.EDU> keinert@IASTATE.EDU (Keinert Fritz) writes: ...about finding an undocumented "pointer(p,real)" declaration in >DEC f77 version 2.1 compiler (for MIPS-based DEC 2100), but > real x > pointer (p, x) >makes p a pointer to a real variable. You can do things like > p=x (p is now pointing to x), > x=p (assign to x the value of whatever p is pointing to), and so on. although not as true-pointer-like as the above quote implies, you have somewhat similar abilities in many DEC fortrans: both VMS and PDP-11. In VMS fortran, creative use of the %LOC(variable) and %VAL(variable) in code or subroutine calls can produce pointer-like operations. Something like: point=%LOC(variable) call foo(%VAL(point)) .... subroutine foo(target) x=target "x" will end up receiving whatever datum was inside "variable" and if you'd used call foo(%VAL(point+4)) "x" would get whatever was in the longword FOLLOWING variable... additonally, you could do x=%REF(%VAL(point+4)) in the main program for the same result. --dick