| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed May 14, 2003 9:28 pm Post subject: Different Commenting Methods |
|
|
I would like to see different commenting methods besides REM statements.
The things I would like to see include the following:
| Code: | | info "Test" # This is a comment with a pound sign |
And:
| Code: | | info "Test" // This is a comment with slashes |
And:
| Code: | /*
All of the code between the slash-asterisk combo is ignored
Multiple lines can be used with it.
And we end it with a asterisk-slash combo.
*/ |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed May 14, 2003 10:02 pm Post subject: Re: Different Commenting Methods |
|
|
| FreezingFire wrote: | I would like to see different commenting methods besides REM statements.
The things I would like to see include the following:
| Code: | | info "Test" # This is a comment with a pound sign |
And:
| Code: | | info "Test" // This is a comment with slashes |
And:
| Code: | /*
All of the code between the slash-asterisk combo is ignored
Multiple lines can be used with it.
And we end it with a asterisk-slash combo.
*/ |
|
Yeah this would be an awesome thing to have. The ability to put remarks after a command or function would be very very nice to have... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Wed May 14, 2003 11:57 pm Post subject: |
|
|
Yes, I agree.
Using PHP style commenting tags would be very usefull. _________________
 |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Thu May 15, 2003 12:10 am Post subject: |
|
|
Here, here!  _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu May 15, 2003 4:06 pm Post subject: |
|
|
| Skit3000 wrote: | You can do that by placing commas after the function you use...
| Code: | | info Hello!, This is a remark.... |
|
Hi Skit,
Ummm 'info' is not a function. It is a command in VDS. Functions in VDS always have the @ sign before it and enclose it's argument list with open parentheses '(' and close parentheses ')'. Functions usually return a value of some kind.
I am a command with a variable number of parameters
| Code: | | DIALOG CREATE,Dragon Browser,-1,0,800,600,CLASS DragonBrowser,PAINT,RESIZABLE,CLICK |
I am a function and I return a value to a variable or command
| Code: | | %A = @sendmsg(%%WebBrowser_hwnd,$07,0,0) |
Anyway I would not suggest using this method to comment your code. Alot of commands like the Dialog command take a variable number of parameters after them. This method could cause confussion for those who have not used VDS very long and they see your code... _________________ Home of
Give VDS a new purpose!

Last edited by vdsalchemist on Thu May 15, 2003 4:25 pm; edited 2 times in total |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu May 15, 2003 4:14 pm Post subject: |
|
|
| GeoTrail wrote: | Yes, I agree.
Using PHP style commenting tags would be very usefull. |
Yeah the '// Some comment' and /*my comment*/ are from C/C++... I don't remember what it is for PHP but I think we would have to have a terminating character to mark the end of the command or function then allow us to place the comment. We could use like in Visual Basic just the single quote for a comment.
This would take a little extra work on the part of the IDE to parse out but it would lead to much more readable code.
I would also like to be able to expand my commands and functions to multiple lines as well. Instead of having a command or function on one line in the IDE. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu May 15, 2003 8:52 pm Post subject: |
|
|
Yes I got the idea from PHP.
Also, it doesn't matter whether or not Skit mentioned a command or
function. However, I don't like to use that because it can create problems.
I'd like to see it done the way I mentioned.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Fri May 16, 2003 6:25 pm Post subject: Re: Different Commenting Methods |
|
|
| FreezingFire wrote: | | Code: | | info "Test" # This is a comment with a pound sign |
And:
| Code: | | info "Test" // This is a comment with slashes |
|
The disadvantage of this is that this would require true # characters and possibly slash
character to be surrounded by double quotes, as in here:
info Test "#"
info Test "//"
or
info "Test #"
This would also break backward compatibility. |
|
| Back to top |
|
 |
|