| View previous topic :: View next topic |
| Author |
Message |
Slaktarn Halfop
Joined: 02 May 2007 Posts: 44
|
Posted: Sat Mar 20, 2010 1:57 am Post subject: Ucomment |
|
|
Hay everyone then it was time again....
1: The only way i have found to ucomment in TCL is #
2: But i try to find a way to do it like C++ or PHP
I need to do
But i wuld like to do something like
| Code: |
/* MyComment */ Code
|
/Slaktarn |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Mar 20, 2010 9:56 am Post subject: |
|
|
That is true, the only way to create a comment in tcl is by using the hash-character (#). Unless you feel like re-writing your tcl-library, don't expect to change this behaviour... _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Slaktarn Halfop
Joined: 02 May 2007 Posts: 44
|
Posted: Sat Mar 20, 2010 1:42 pm Post subject: |
|
|
| nml375 wrote: | | That is true, the only way to create a comment in tcl is by using the hash-character (#). Unless you feel like re-writing your tcl-library, don't expect to change this behaviour... |
Donīt you think its bad that its only way to do it
You canīt make notes on same row before a code just after and onn a own row its insane. Considering there its a old language and shuld be away to do it. My opinion relly strange
/Slaktarn |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sat Mar 20, 2010 2:13 pm Post subject: |
|
|
| Slaktarn wrote: | | nml375 wrote: | | That is true, the only way to create a comment in tcl is by using the hash-character (#). Unless you feel like re-writing your tcl-library, don't expect to change this behaviour... |
Donīt you think its bad that its only way to do it
You canīt make notes on same row before a code just after and onn a own row its insane. Considering there its a old language and shuld be away to do it. My opinion relly strange
/Slaktarn |
| Code: | set b "huh" ; # comment
set c "exactly" ; # another comment |
Putting comments before code is meant for compiled languages, tcl is interpreted. Therefore comments need to go "; #after" code, or on a line of their own. This simplifies the constructs the parser needs to recognize to see the item as a comment. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Slaktarn Halfop
Joined: 02 May 2007 Posts: 44
|
Posted: Sat Mar 20, 2010 3:21 pm Post subject: |
|
|
| speechles wrote: |
| Code: | set b "huh" ; # comment
set c "exactly" ; # another comment |
Putting comments before code is meant for compiled languages, tcl is interpreted. Therefore comments need to go "; #after" code, or on a line of their own. This simplifies the constructs the parser needs to recognize to see the item as a comment. |
Hehe so the only way to do it is the way you show... Hoever im not so good in TCL you seems to be relly good.
; is to tells that its the end of code/line right so its batter to have
| Code: |
1: set a [lindex 1] ; # Comment
2: set b [lindex 1] # Comment
|
Then the exampel 1 is batter then exampel 2 i guss
/ Slaktarn |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Mar 20, 2010 5:36 pm Post subject: |
|
|
| Slaktarn wrote: | | nml375 wrote: | | That is true, the only way to create a comment in tcl is by using the hash-character (#). Unless you feel like re-writing your tcl-library, don't expect to change this behaviour... |
Donīt you think its bad that its only way to do it
You canīt make notes on same row before a code just after and onn a own row its insane. Considering there its a old language and shuld be away to do it. My opinion relly strange
/Slaktarn |
Nope, it's the way tcl works, and it works well enough for me...
And frankly, C is far older than tcl...
Honestly, I can't even see the problem with not being able to put comments in front of a line of code.. To me, that'd just make the whole piece of code harder to read, but then again, that's just my humble opinion..
I suppose you've got an issue with the way you comment code in bash-scripts too? _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|