View unanswered posts | View active topics It is currently Sat Dec 27, 2025 7:21 pm



Reply to topic  [ 4 posts ] 
 TWXProxy Script commenting questions 
Author Message
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 270
Unread post TWXProxy Script commenting questions
I made a post earlier that wasn't very descriptive in the title or the body, and didn't specify the helper, my appologies. Thought I would just do a new post trying to have a more descriptive title in case a new scripter is doing a search later.

As I said in the previous message, when doing a comment in a TWXProxy script, the # at the beginning of each line is well known and the most used commenting technique out there.

I saw in a script written by someone, I think it was Sing, // used on a line of code to make a comment after the code itself - if I was seeing that right. I would appreciate if someone could confirm that this is correct, or let me know I am mistaken.

I did a search of the forum for multi-line commenting, I thought I had seen a comment spanning multiple lines in a script or script example in the forum somewhere, but I couldn't find it doing a search.

Is it possible to do a multiple line comment in a TWXProxy script with a set of symbols marking the start and end of the comment? If so, was it /* to begin and */ to end? Or is something else used to start and end a multiple line comment? I would appreciate it if someone could confirm this or tell me I am mistaken.


Tue Aug 20, 2013 1:47 pm
Profile
Lieutenant Commander
User avatar

Joined: Sun Jan 29, 2006 3:00 am
Posts: 800
Location: Iowa
Unread post Re: TWXProxy Script commenting questions
So let's test it...
Code:
# Test Script
#      Testing various Rem(s)
#                          in twx script
:howdy
echo "** This is test of remarks w/ twx.**"
:test1
# ok, pretty tame so far
echo "** Ok, now for a //...**" //  This is meant to test the // remark theory
:post                           //    This is the second test of the //
# ok, now for  the multi line trial
:multiline
/*  just testing a multi line remark
to see if it works at all or if it will
      end in some sort of failure...*/
     
# ok fin
:Dats_All
echo "That'll about do it for this test"


This gets us this:
Loading and compiling script: C:\TWXProx2.04\scripts\_Working\__RemTesting.ts

Citadel command (?=help)
Script compilation error: Operation syntax error, line 8 (__REMTESTING.TS)


Script terminated: C:\TWXProx2.04\scripts\_Working\__RemTesting.ts


So I change line 8 from this:
Code:
echo "** Ok, now for a //...**" //  This is meant to test the // remark

To this:
Code:
echo "** Ok, now for a //...**" # //  This is meant to test the // remark


Pooh, same result, duplicate error. So now I change line 8 to:
Code:
#echo "** Ok, now for a //...**" //  This is meant to test the // remark


Result?
Script compilation error: Operation syntax error, line 9 (__REMTESTING.TS)
Doh! Doesn't care for that // rem at all...
Ok, so I # out line 9..
Error in line 12.
Ok, that's the /* multiline comment. */

So for my testing, on my version of twx..the only rem I can find is the #.

_________________
#+++
The early bird may get the worm, but the second mouse gets the cheese.
#---


Tue Aug 20, 2013 3:31 pm
Profile ICQ YIM
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 270
Unread post Re: TWXProxy Script commenting questions
Doh! :lol: Thanks Crosby, should have thought about just testing it in a script! Well, maybe there is a way to do the other 2 ways of commenting and I just misread when i did the search. Or maybe # is the only way to comment. Thanks for taking a look at it and running that test :)

Post Edit :

I did an extremely simple script to do a sector display from the command prompt. It appears the inline remark function with // does work, although as I said it is a very simple script so who knows with something longer. Maybe I should test on a bigger script? Here is the test script code :

Code:

# Comments test

:comment1
send "*" // This should do a display of the sector

halt



Tue Aug 20, 2013 3:38 pm
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1133
Location: Augusta, GA
Unread post Re: TWXProxy Script commenting questions
I added inline comments with the beta of v2.05. I believe all of the beta versions floating around include this, as it was added early.
Begin inline coments with //

There is no multiline comment available at this time.

Regards,
+EP+

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Fri Aug 23, 2013 10:32 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.