2007 Sep 16 5:17 AM
Hi,
Below are the details, this is a small report but am not understanding the logic. and am giving output also you can find after the report. Please can anyone explain me. It will be great helpful to me.
REPORT ZTEST.
DATA number TYPE i VALUE -1234.
WRITE 6789.
MOVE 100 TO number.
*OUTPUT = 6.789.
Thanks,
Medha.
2007 Sep 16 8:15 AM
Hi Medha
This is the logic behind working of the program-
DATA number TYPE i VALUE -1234.
1. If u try to write number now it will show u the o/p 1234 -.
WRITE: 'number=',number.(o/p value 1234-)
2. WRITE 6789.
This statement will write 6,789.Because it is a numeric literal.
If u want to write 6789 as it is then put the 6789 in single quotes.( ' 6789' )
3. MOVE 100 TO number
after this statement number variable will contain the value 100 rather than -1234.
Please reward the point if useful.
Regards,
Rajesh Akarte
Hi Medha
This is the logic behind working of the program-
DATA number TYPE i VALUE -1234.
1. If u try to write number now it will show u the o/p 1234 -.
WRITE: 'number=',number.(o/p value 1234-)
2. WRITE 6789.
This statement will write 6,789.Because it is a numeric literal.
If u want to write 6789 as it is then put the 6789 in single quotes.( ' 6789' )
3. MOVE 100 TO number
after this statement number variable will contain the value 100 rather than -1234.
Please reward the point if useful.
Regards,
Rajesh Akarte
2007 Sep 16 5:28 AM
Hi
Check your default (Display format for numbers) must be decimal separators.....
2007 Sep 16 8:15 AM
Hi Medha
This is the logic behind working of the program-
DATA number TYPE i VALUE -1234.
1. If u try to write number now it will show u the o/p 1234 -.
WRITE: 'number=',number.(o/p value 1234-)
2. WRITE 6789.
This statement will write 6,789.Because it is a numeric literal.
If u want to write 6789 as it is then put the 6789 in single quotes.( ' 6789' )
3. MOVE 100 TO number
after this statement number variable will contain the value 100 rather than -1234.
Please reward the point if useful.
Regards,
Rajesh Akarte
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |