Position (InvalidHexData property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (match syntax table to syntax template, tags and edits)
Line 1: Line 1:
{{Template:InvalidHexData:Position subtitle}}
{{Template:InvalidHexData:Position subtitle}}
This readOnly property is the position in the (expected) hexadecimal string where a nonhexadecimal character was found


==Syntax==
==Syntax==
Line 5: Line 6:
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%pos</th>
<tr><th>%number</th>
<td>This numeric value is the position in the hexadecimal string where a non-hexadecimal character was found. Position is <code>0</code> if the exception was caused because the method object string contained an odd number of characters.
<td>This numeric value is the position in the hexadecimal string where a non-hexadecimal character was found. <var class="term">%number</var> will be <code>0</code> (zero) if the exception was caused because the method object string contained an odd number of characters.
</td></tr>
</td></tr>
<tr><th>%invHex</th>
<tr><th>%invalidHexData</th>
<td>A reference to an instance of an InvalidHexData object.
<td>A reference to an instance of an <var>[[InvalidHexData_class|InvalidHexData]]</var> object.
</td></tr></table>


</td></tr></table>
==Example==
==Example==
<ol><li>The following statements catch an InvalidHexData exception and print its position:
<p class="code">  %target is object invalidhexdata
  [[try]] %myobject:mymethod
    [[catch]] invalidHexData to %target
    print '%target is ' %target:Position
  end try
</p></ol>


The following statements catch an InvalidHexData exception
and print its position:
<p class="code"> %target is object invalidhexdata
try %myobject:mymethod
  catch invalidHexData to %target
  Print '%target is ' %target:Position
end try
</p>
==See also==
==See also==
{{Template:InvalidHexData:Position footer}}
{{Template:InvalidHexData:Position footer}}

Revision as of 05:34, 22 April 2011

Input string position where non-hexadecimal character found (InvalidHexData class) This readOnly property is the position in the (expected) hexadecimal string where a nonhexadecimal character was found

Syntax

%number = invalidHexData:Position

Syntax terms

%number This numeric value is the position in the hexadecimal string where a non-hexadecimal character was found. %number will be 0 (zero) if the exception was caused because the method object string contained an odd number of characters.
%invalidHexData A reference to an instance of an InvalidHexData object.

Example

  1. The following statements catch an InvalidHexData exception and print its position:

    %target is object invalidhexdata try %myobject:mymethod catch invalidHexData to %target print '%target is ' %target:Position end try

See also