Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 5 - Text Utilities / Text Utilities Reference
Routines / Converting Date and Time Strings Into Numeric Representations


InitDateCache

The InitDateCache function initializes the date cache record, which is used to store data for use by the StringToDate and StringToTime functions.

FUNCTION InitDateCache(theCache: DateCachePtr): OSErr;
theCache
A pointer to a record of type DateCacheRecord. This parameter can be a local variable, a pointer, or a locked handle.
DESCRIPTION
You must call InitDateCache to initialize the date cache record before using either the StringToDate or StringToTime functions. You must pass a pointer to a date cache record. You have to declare the record as a variable or allocate it in the heap.

If you are writing an application that allows the use of global variables, you can make your date cache record a global variable and initialize it once, when you perform other global initialization.

SPECIAL CONSIDERATIONS
InitDateCache may move memory; your application should not call this function at interrupt time.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the InitDateCache function are
Trap macroSelector
_ScriptUtil$8204 FFF8

RESULT CODES
noErr0No error
fatalDateTime-32768A miscellaneous fatal error occurred, usually a failure in a call to get a resource
SEE ALSO
InitDateCache calls the GetResource and LoadResource routines and it can also return the error codes they produce. These routines and their return values are described in the book Inside Macintosh: Operating System Utilities.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996