>> >(1) There is a mistake in your function name. FN buildGWorld(@rectPtr&) >> >should be FN buildGWorld&(@rectPtr&), so that it can return a LONG value >> >(END FN = theWorld&). >> >> The function in PG has no '&' in the function name. > > >FB function return types default to long, so this isn't required. Thanks, Derek, for pointing out this seriously little-known fact. You are absolutely right, and I wish I hadn't already typed a "&" character as a name-suffix for ooh it must be thousands of LOCAL FNs returning a LONG. On investigation, the story turns out to have an unexpected twist. The following three FNs compile to exactly the same 68K code. LOCAL FN myLongFN& END FN =_maxLong LOCAL FN myIntFN% END FN =_maxLong LOCAL FN myDefaultFN END FN =_maxLong The suffix makes _nil difference to the code. And so you only need a name-suffix when returning a string ($) or floating point value (! or #). Robert