Scripting Additions Guide

CHAPTER 3
Writing Scripting Additions
88 Types of Scripting Additions
In C, the “coerce from pointer” coercion form (CSPT) is
pascal OSErr MyCoercePtr (DescType fromType,
Ptr dataPtr,
Size dataSize,
DescType toType,
long theRefCon,
AEDesc *theResult);
In Pascal, the “coerce from pointer” coercion form (CSPT) is
FUNCTION MyCoercePtr (typeCode:DescType;
dataPtr: Ptr;
dataSize: Size;
toType: DescType;
refcon: LongInt;
VAR addressDesc: AEDesc): OSErr;
In C, the “coerce from descriptor” coercion form (CSDS) is
pascal OSErr MyCoerceDesc (AEDesc theFromDesc,
DescType toType,
long theRefCon,
AEDesc *theResult);
In Pascal, the “coerce from descriptor” coercion form (CSDS) is
FUNCTION MyCoerceDesc (theFromDesc: AEDesc;
toType: DescType;
theRefCon: LongInt;
VAR addressDesc: AEDesc): OSErr;