Dan Baeckström wrote: > I have previously been shown here how values can be returned from local fns using pointers to variables > > local fn sillydemo(a as short, b as ^short,c as ^double) > b.0% = 2*a > c.0# = pi*a > end fn > > dim as short x > dim as double y > fn sillydemo(3,@x,@y) > print x,y > > My next question is: how is the corresponding thing achieved when I want the fn to return an FSRef? '-------------------- include "Util_FileDirectory.incl" local fn Foo( f as ^FSRef ) '~'1 fn FD_ApplicationDirectoryGetFSRef( #f ) // '#' above means pass the value of f, not its address; f is already a pointer end fn dim as FSRef ref fn Foo( @ref ) // '@' above means 'pass the address of ref'. // It is not actually needed in this case, because FBtoC // automatically supplies it when the variable is a record. '...do something with ref... '--------------------- Robert P.