|
Last change
on this file since 3127 was 2, checked in by bird, 23 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:
1.1 KB
|
| Line | |
|---|
| 1 | /*--------------------------------------------------------------------------*/
|
|---|
| 2 | /* file_name : err4.java */
|
|---|
| 3 | /* : */
|
|---|
| 4 | /* Cause : Evaluation of the array which used the substitution */
|
|---|
| 5 | /* : operator is not performed correctly. */
|
|---|
| 6 | /* : */
|
|---|
| 7 | /* Message : NG1:[27}-->[9.0] */
|
|---|
| 8 | /* : NG1:[27}-->[9.0] */
|
|---|
| 9 | /*--------------------------------------------------------------------------*/
|
|---|
| 10 |
|
|---|
| 11 | public class err4 {
|
|---|
| 12 | public static void main(String[] args) {
|
|---|
| 13 |
|
|---|
| 14 | // TEST1
|
|---|
| 15 | float []a = {9f};
|
|---|
| 16 | a[0] *= (a[0] = 3f);
|
|---|
| 17 |
|
|---|
| 18 | if ( a[0] == 27 ) {
|
|---|
| 19 | System.out.println("OK1");
|
|---|
| 20 | } else {
|
|---|
| 21 | System.out.println("NG1:[27}-->["+a[0]+"]");
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | //TEST2
|
|---|
| 25 | float [] b = {9f};
|
|---|
| 26 | b[0] = (float)(b[0] * (b[0] = 3f));
|
|---|
| 27 | if ( b[0] == 27 ) {
|
|---|
| 28 | System.out.println("OK1");
|
|---|
| 29 | } else {
|
|---|
| 30 | System.out.println("NG1:[27}-->["+b[0]+"]");
|
|---|
| 31 | }
|
|---|
| 32 | }
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.