on 08-08-2007 3:13 PM
I see this all through different scripts and reports and I want to know if it is just done as a way to comment out a line or if there is another reason. To me this looks very confusing and is poor programming.
IF &VBDKR-VTWEG& NE &VBDKR-VTWEG&
INCLUDE &TVKO-TXNAM_KOP& OBJECT TEXT ID ADRS
ENDIF
I am assuming that the if statement was constructed as a way to comment out the include. However why would you want to do that rather than just commenting it out (using /*)?
Davis
Hi!
In SAPScript, commenting is complicated and the lazy programmers like to use statements like this
/: IF 1 = 2
...
/: ENDIF
What you wrote is the same. If it not a mistype, you can comment it out, or remove it from the source code.
Regards
Tamá
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tamas, thanks for the help. I see this all over the place, even in reports. I assumed that this programmer was just lazy and decided to use comments that way. There is no reason for it, in my opinion, especially when you are writing a report. It would be much easier to code (and read) if they just used an * at the beginning of the line.
Thanks again!
Davis
Nick, thanks for the reply also. I am converting this SAPScript into a SmartForm so I will just be leaving that statement out. This is one of many that I have found in this particular form.
Message was edited by:
Davis
Hi Davis,
It does look a bit strange I admit. The only benfit of this I can see is that
/: INCLUDE &TVKO-TXNAM_KOP& OBJECT TEXT ID ADRS
and
/* INCLUDE &TVKO-TXNAM_KOP& OBJECT TEXT ID ADRS
look quite similar, and the editor doesn't highlight the comment as such. I personally like as little clutter as possible in the SAPscript text editor and would delete the line rather than comment it out.
Regards,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.