2009 Feb 19 6:39 AM
Hello ,
can we compare like this ?
if i = j + 10.
statements
endif.
if it is not possible to compare like this what is the reason.
And is there any option to compare like this.
Thank And Regards,
Sham
2009 Feb 19 6:44 AM
You cannot directly use expression in CONDITIONAL Statements.(Its possible in C,C++ etc)
USE:
J = J + 10.
If i = j.
Endif.
Hope this resolve your issue.
Regards,
Gurpreet.
in if u can not use + , - , * and / operators
2009 Feb 19 6:42 AM
do like this,
declare var type of j
then var = j + 10
if i = var .
do
endif.
2009 Feb 19 6:43 AM
Hello ,
I know we can do like that .
But can we do like this. In some languages this option is valid.
so i am trying like this.
2009 Feb 19 6:51 AM
2009 Feb 19 6:43 AM
2009 Feb 19 6:44 AM
U cannot compare like that , instead write as ..
j = j + 10.
if i = j .
*statements ...
endif.
2009 Feb 19 6:44 AM
2009 Feb 19 6:46 AM
2009 Feb 19 6:44 AM
You cannot directly use expression in CONDITIONAL Statements.(Its possible in C,C++ etc)
USE:
J = J + 10.
If i = j.
Endif.
Hope this resolve your issue.
Regards,
Gurpreet.
2009 Feb 19 6:48 AM
Please run this test program.
REPORT test.
data: i type i VALUE 2,
k type i VALUE 5,
temp type i.
temp = i + 3.
if k = temp.
WRITE: 'I am a Lazy person.I can not try out myself.shame on me :-( Ugly!!!'.
ENDIF.
2009 Feb 19 7:04 AM
Hello Amit,
I know how to write it.
But some of my friend have asked me can we write like this, then i thought we can write in C language so i have tried it .
Once read my reply
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |