++++++ Typical examples Macintosh toolbox interface functions:
pico pNewHandle(x)
pico x;
{
	return boxPtr(NewHandle((Size)nextNum(&x)));
}

pico pSetHandleSize(x)
pico x;
{
	Handle h;

	h = (Handle)nextNum(&x);
	SetHandleSize(h, (Size)nextNum(&x));
	return  MemError() ? nilSym : tSym;
}

++++++ As a more complex example, here the implementation of ModalDialog.
pico modalDef;

pascal bool modalProc(theDialog, theEvent, itemHit)
DialogPtr theDialog;
EventRecord *theEvent;
integer *itemHit;
{
	return isNil(applyProc(modalDef,
				boxNum(theDialog), boxNum(theEvent), boxNum(itemHit))) ?
			NO : YES;
}

pico pModalDialog(x)
pico x;
{
	integer itemHit;

	ModalDialog(nextProc(&x, &modalDef, modalProc), &itemHit);
	return setVal(nextVar(&x), boxNum(itemHit));
}

pico pNewWindow(x)
pico x;
{
	Ptr wStorage;
	Rect boundsRect;
	Str255 title;
	bool visible;
	integer procID;
	WindowPtr behind;
	bool goAwayFlag;

	wStorage = nextPtr(&x);
	nextRect(&x,&boundsRect);
	nextString(&x,title);
	visible = nextBool(&x);
	procID = (integer)nextNum(&x);
	behind = (WindowPtr)nextPtr(&x);
	goAwayFlag = nextBool(&x);
	return boxPtr(NewWindow(wStorage, &boundsRect, title, visible,
						procID, behind, goAwayFlag, (long)EVAL1(x)) );
}
