New (CharacterToUnicodeMap constructor): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (→Usage notes) |
||
Line 22: | Line 22: | ||
==Usage notes== | ==Usage notes== | ||
<ul> | <ul> | ||
<li>Issuing <var>New</var> with no parameters produces a map where every single-byte code point is invalid. | |||
You probably would do this only if you are subsequently going to build up the map incrementally | |||
using the <var>[[Update (CharacterToUnicodeMap subroutine)|Update]]</var> method. | |||
<li>As described in [[Object variables#Using New or other Constructors|"Using New or other Constructors"]], <var>New</var> can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is <var>Null</var>:<p class="code">%charToUniMap = new | <li>As described in [[Object variables#Using New or other Constructors|"Using New or other Constructors"]], <var>New</var> can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is <var>Null</var>:<p class="code">%charToUniMap = new | ||
Revision as of 23:24, 29 November 2011
Create CharacterToUnicodeMap object (CharacterToUnicodeMap class)
[Introduced in Sirius Mods 8.0]
This page is under construction.
Syntax
%characterToUnicodeMap = [%(CharacterToUnicodeMap):]New[( [In= string], - [Out= unicode], [Pad= unicode])]
Syntax terms
%outCharacterToUnicodeMap | A CharacterToUnicodeMap object. |
---|---|
%(CharacterToUnicodeMap) | The optional class name in parentheses denotes a Constructor. See "Usage notes", below, for more information about invoking a CharacterToUnicodeMap Constructor. |
In | An optional, name required, String that specifies the single-byte character code points to be mapped to their Unicode</var translation characters in the Out argument. No character duplications are allowed in the In string, which may not be more than 256 characters. |
Out | An optional, name required, Unicode string, each of whose characters is mapped to the character in the In string that occupies the same relative position in the string. The Out string may not be longer than the In; it may be shorter, however, as long as a Pad character is specified. Out may not contain more than 256 characters. |
Pad | An optional, name required, Unicode string argument that specifies the character(s) used to pad the Out string on the right if it is shorter than In. |
Usage notes
- Issuing New with no parameters produces a map where every single-byte code point is invalid. You probably would do this only if you are subsequently going to build up the map incrementally using the Update method.
- As described in "Using New or other Constructors", New can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is Null:
%charToUniMap = new %charToUniMap = %(CharacterToUnicodeMap):new %charToUniMap = %charToUniMap:new