📄 instructions2.doc2.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>VM Spec </title>
</head>
<body BGCOLOR=#eeeeff text=#000000 LINK=#0000ff VLINK=#000077 ALINK=#ff0000>
<table width=100%><tr>
<td><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc1.html">Prev</a> | <a href="Instructions2.doc3.html">Next</a> | <a href="Lindholm.INDEX.html">Index</a></td><td align=right><i><i>The Java<sup><font size=-2>TM</font></sup> Virtual Machine Specification</i></i></td>
</tr></table>
<hr><br>
<a name="caload">
</a><h2>caload</h2>
<a name="caload.Operation"></a>
<b>Operation</h3></b>
<a name="67348"></a>
Load <code>char</code> from array<p><Table Border="1">
<tr><td><a name="67347"></a>
<i>caload</i>
<td><a name="87568"></a>
</Table><br><br><p>
<a name="caload.Forms"></a>
<b>Forms</h3></b>
<a name="67349"></a>
<i>caload</i><em> </em>= 52 (0x34)<p>
<a name="caload.Stack"></a>
<b>Stack</h3></b>
<a name="67350"></a>
..., <i>arrayref</i>, <i>index</i> <img src="chars/arrwdbrt.gif"> ..., <i>value</i><p>
<a name="caload.Description"></a>
<b>Description</h3></b>
<a name="67351"></a>
The <i>arrayref</i> must be of type <code>reference</code> and must refer to an array whose components are of type <code>char</code>. The <i>index</i> must be of type <code>int</code>. Both <i>arrayref</i> and <i>index</i> are popped from the operand stack. The <code>char</code> <i>value</i> in the component of the array at <i>index</i> is retrieved, zero-extended to an <code>int</code> <i>value</i>, and pushed onto the top of the operand stack.<p>
<a name="caload.Runtime"></a>
<b>Runtime Exceptions</h3></b>
<a name="67353"></a>
If <i>arrayref</i><em> </em>is <code>null</code>, <i>caload</i> throws a <code>NullPointerException</code>. <p>
<a name="67354"></a>
Otherwise, if <i>index</i> is not within the bounds of the array referenced by <i>arrayref</i>, the <i>caload</i> instruction throws an <code>ArrayIndexOutOfBoundsException</code>.<p>
<a name="castore"></a>
<hr><h2>castore</h2>
<a name="castore.Operation"></a>
<b>Operation</h3></b>
<a name="67363"></a>
Store into <code>char</code> array<p><Table Border="1">
<tr><td><a name="67362"></a>
<i>castore</i>
<td><a name="87568"></a>
</Table><br><br><p>
<a name="castore.Forms"></a>
<b>Forms</h3></b>
<a name="67364"></a>
<i>castore</i> = 85 (0x55)<p>
<a name="castore.Stack"></a>
<b>Stack</h3></b>
<a name="67365"></a>
..., <i>arrayref</i>, <i>index</i>, <i>value</i> <img src="chars/arrwdbrt.gif"> ...<p>
<a name="castore.Description"></a>
<b>Description</h3></b>
<a name="67366"></a>
The <i>arrayref</i> must be of type <code>reference</code> and must refer to an array whose components are of type <code>char</code>. The <i>index</i> and the <i>value</i> must both be of type <code>int</code>. The <i>arrayref</i>, <i>index</i>, and <i>value</i> are popped from the operand stack. The <code>int</code> <i>value</i> is truncated to a <code>char</code> and stored as the component of the array indexed by <i>index</i>. <p>
<a name="castore.Runtime"></a>
<b>Runtime Exceptions</h3></b>
<a name="67368"></a>
If <i>arrayref</i><em> </em>is <code>null</code>, <i>castore</i> throws a <code>NullPointerException</code>. <p>
<a name="67369"></a>
Otherwise, if <i>index</i> is not within the bounds of the array referenced by <i>arrayref</i>, the <i>castore</i> instruction throws an <code>ArrayIndexOutOfBoundsException</code>.<p>
<hr>
<!-- This inserts footnotes--><p>
<a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc1.html">Prev</a> | <a href="Instructions2.doc3.html">Next</a> | <a href="Lindholm.INDEX.html">Index</a>
<p>
<font size = -1>Java Virtual Machine Specification <br>
<!--(HTML generated by dkramer on March 31, 1997)-->
<!--
(HTML generated by dkramer on March 25, 1997)-->
<br>
<i><a href="Copyright.doc.html">Copyright © 1996, 1997 Sun Microsystems, Inc.</a>
All rights reserved</i>
<br>
Please send any comments or corrections to <a href="mailto:jvm@java.sun.com">jvm@java.sun.com</a>
</font>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -