Last change
on this file was 2, checked in by bird, 22 years ago |
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
File size:
907 bytes
|
Line | |
---|
1 | /*--------------------------------------------------------------------------*/
|
---|
2 | /* File name : err12.java */
|
---|
3 | /* : */
|
---|
4 | /* Cause : Cast negative floating point to char makes error */
|
---|
5 | /* : */
|
---|
6 | /* Message : Internal compiler error in functi on convert_move */
|
---|
7 | /*--------------------------------------------------------------------------*/
|
---|
8 |
|
---|
9 | public class err12 {
|
---|
10 | public static void main(String[] args){
|
---|
11 | char x1, x2;
|
---|
12 |
|
---|
13 | float y = -10000f;
|
---|
14 |
|
---|
15 | x1 = (char)y; // err
|
---|
16 | x2 = (char)-10000f; // ok
|
---|
17 |
|
---|
18 | if ( x1 == x2 ) {
|
---|
19 | System.out.println("OK");
|
---|
20 | } else {
|
---|
21 | System.out.println("NG");
|
---|
22 | System.out.println("x1:[65520]-->[" +(x1-0)+"]");
|
---|
23 | System.out.println("x2:[65520]-->[" +(x2-0)+"]");
|
---|
24 | }
|
---|
25 | }
|
---|
26 | }
|
---|
27 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.