View unanswered posts | View active topics It is currently Tue Apr 16, 2024 1:31 pm



Reply to topic  [ 8 posts ] 
 comment code questions 
Author Message
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post comment code questions
I remember that # is used for a single line comment.

After doing a search on comment, I saw that // appears to be how to do a comment on the same line as some actual code if placed after the actual code, am I understanding correctly? If not, I would appreciate any clarification someone can give me.

I seem to remember there is a way to do mark the beginning and end of a multi-line comment, is this correct? Is it /* to start and */ to end the multi-line comment? If not and if there is a way to make a comment you believe is going to span multiple lines, i would appreciate it if someone could tell me what the characters are for the beginning and end of the multi-line code.

Thanks


Mon Aug 19, 2013 10:41 pm
Profile
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post Re: comment code questions
SteveH_66 wrote:

After doing a search on comment, I saw that // appears to be how to do a comment on the same line as some actual code if placed after the actual code, am I understanding correctly? If not, I would appreciate any clarification someone can give me.

I seem to remember there is a way to do mark the beginning and end of a multi-line comment, is this correct? Is it /* to start and */ to end the multi-line comment? If not and if there is a way to make a comment you believe is going to span multiple lines, i would appreciate it if someone could tell me what the characters are for the beginning and end of the multi-line code.

Thanks


That is correct for Telix, dunno TWX.

EDIT:

Will not work for Qmodem or REXX (ZOC), although I think the /* followed by */ at the end of multiline comments works in ZOC.

Telix SALT is more or less C, which might be why a general search brought up what you found.


Tue Aug 20, 2013 9:39 am
Profile
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Re: comment code questions
Thanks Kav, I was referring to TWX Proxy in particular. Sorry about not mentioning that specifically in the OP folks, my bad :oops:


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

Joined: Sun Jan 29, 2006 3:00 am
Posts: 793
Location: Iowa
Unread post Re: comment code questions
iirc the # was the only way to put in a rem.
There was discussion about adding the // same line rem,
but i don't think it is active yet.

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


Tue Aug 20, 2013 2:27 pm
Profile ICQ YIM
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Re: comment code questions
Hey Crosby, thanks for doing that test script you did in the other post, but it does appear that the in-line rem function is working, I did a test and this following code works, or at least i didn't get any error messages from it, although it is an extremely simple script. It did a sector display which was all of the code in the script, and as you can see I have a // rem on that line. I'm going to continue watching the other post, hopefully anyone with further info to add will weigh in there. Thanks

Code:

# Comments test

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

halt



Tue Aug 20, 2013 4:08 pm
Profile
Lieutenant Commander
User avatar

Joined: Sun Jan 29, 2006 3:00 am
Posts: 793
Location: Iowa
Unread post Re: comment code questions
It is entirely possible that the newer version of twx that
works w/ windows 7 has the new in line rem function. I still
crawl along w/ windows XP.

If you got it to work, good on ya! I was just showing how
to test if it worked...

Quote:
I'm going to continue watching the other post, hopefully anyone with further info to add will weigh in there.


I'm watching too, I learn new stuff all the time...

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


Tue Aug 20, 2013 4:52 pm
Profile ICQ YIM
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Re: comment code questions
Crosby you were thinking on your feet better than I was in this case, and from what I've seen in your past posts, you seem to be a better scripter than I :) But as you said in the last post, this seems to be like anything else in life, a good learning opportunity.


Tue Aug 20, 2013 6:30 pm
Profile
Ensign
User avatar

Joined: Mon Dec 26, 2011 8:41 am
Posts: 206
Unread post Re: comment code questions
SteveH_66 wrote:
If not and if there is a way to make a comment you believe is going to span multiple lines, i would appreciate it if someone could tell me what the characters are for the beginning and end of the multi-line code.


If the main reason you want this is because it's a pain to add the # manually to the beginning of each line, well if you are using Notepad++ and you have defined # as a Open line comment, you can toggle the comments on multiple selected lines using Ctrl+Q.


Wed Sep 18, 2013 6:41 am
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users 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 STSoftware.