MaxItemLength (Stringlist property)

From m204wiki
Revision as of 19:49, 31 December 2010 by Dme (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Return maximum Stringlist item length

Under Sirius Mods Version 6.5, this method returns the maximum Stringlist item length. Under Sirius Mods Version 6.6, this method returns the part of a Stringlist item that is on the first CCATEMP page of the item. While items can be considerably longer than this (up to 2**31-1 bytes), this limit still affects some methods. For example, the Locate (Stringlist function) and LocateUp (Stringlist function) will not search beyond the MaxItemLength column in a Stringlist item.

MaxItemLength accepts no arguments, and it returns the maximum length of a Stringlist item (currently 6124) or the part of a Stringlist item that is on the first CCATEMP page of the item.

MaxItemLength is a member of the Stringlist class.

MaxItemLength Syntax

%max = %(Stringlist):MaxItemLength

Syntax Terms

%max
A numeric variable set to the maximum length of a Stringlist item.
%(Stringlist
The class name in parentheses denotes a shared method. MaxItemLength can also be invoked via a Stringlist object variable, which may be null.

Usage Notes

  • MaxItemLength's chief purpose is to avoid having code with a constant (like 6124) whose value is subject to change. Under Sirius Mods Version 6.5, 6124 was the maximum length of a Stringlist item. Under Sirius Mods Version 6.6 and later, some methods such as Locate and LocateUp still only operate on the first 6124 bytes of Stringlist items. While Sirius Software is not likely to reduce this value, because of the complex backward compatibility issues, it might someday increase it, as it eliminated the Stringlist item length limit in Sirius Mods 6.6.