[Next] [Previous] [Up] [Top] [Contents] [Index]

11.3 Script Utilities

11.3.3 Version Markers


The VersionMarker structure is used to remember state information about the script so that changes to the script can be detected. VersionMarker arrays are generated by certain utilties that return token values; if the state of the script changes from what is recorded in the VersionMarker array, then re-reading the tokens will return a different result. Even if no tokens are returned from an expression evaluation, some state information will be generated.

When you call a script Utility that generates VersionMarkers, you pass in the address of a VersionMarker *; if this address intially contains NULL, then a new VersionMarker array is allocated. Otherwise, the existing VersionMarker array is appended.

The actuial content of a VersionMarker structure is private to PsyScope. You should never create or modify a VersionMarker structure directly.

To determine if the state of the script has changed with respect to the information stored in a VersionMarker array, call SameVersions(); this utility returns FALSE if the state has changed in some relevent way. VersionMarker arrays must be freed with FreeVersionMarkers().

Note: When using version tracking, it may be useful to watch the value of markAllocCount ??, an integer that stores the number of version markers currently allocated, to be sure that all of you markers are being freed correctly.


PSYX Programmer's Manual - 24 AUG 95
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with CERN WebMaker