CurrentRecord (Record function)

From m204wiki
Revision as of 20:25, 15 April 2011 by JAL2 (talk | contribs) (Created page with "<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span> CurrentRecord constructor <p> <var>CurrentRecord</var> is a member ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<section begin=dpl_desc/><section end=dpl_desc/>

CurrentRecord is a member of the Record class.

This shared function instantiates a Record object from the current record in a For loop or record set.

Syntax

%rec = [%(Record):]CurrentRecord( [lockstr] - [, LoopLockStrength=lockstrength] )

Syntax Terms

%(Record) Since this is a shared method, this method object can be the class name, Record, in parentheses, or it can be a declared Record object variable, which must have the same file or group context as the For loop within which CurrentRecord is invoked.

Under Sirius Mods version 6.8 and later, the CurrentRecord method does not have to be preceded by any method object, since it acts like a constructor. For more information about shared methods, see "Shared class members".

lockstr The value of a Lockstrength enumeration: None, Share, or Exclusive. These correspond to standard Model 204 record-locking levels, as described below. The default lock strength of the new Record object is Share.
None
Record is not locked.
No locks are held on the object, so there is no conflict with others holding Share or Exclusive locks (readers and updaters may proceed).
Share
Record is share locked.
This level allows other users to hold a Share lock, but not an Exclusive lock (allows readers but not updaters to proceed).
Exclusive
Record is exclusively locked.
This level prohibits others from holding either an Exclusive lock or a Share lock. It is generally used for update.
LoopLockStrength=lockstrength The lock strength to be used for loops on the Record. This is an optional, name required, parameter, and it defaults to None. See "LoopLockStrength for Records". This parameter is available in Sirius Mods 7.0 and later.

Usage Notes

  • CurrentRecord must be invoked from inside a record loop that has the same file or group context as declared for the Record object variable.
  • Under Sirius Mods version 6.8 and later, the CurrentRecord method name does not have to be preceded by the class name or by an object variable.
  • For more information and examples, see "Using CurrentRecord to instantiate a Record object.