Source language: Translate to:

Marking blocks for comments

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Marking blocks for comments

Postby carlos torres » Thu Feb 15, 2007 12:36 pm

It will be nice to have function to convert /put in comment a big block of code.

When you highlight a block of code you can toggle it in coment or reverse it to code.

It is useful when you are debbuging or want to test any specific behavior.

Thanks
User avatar
carlos torres
 
Posts: 289
Joined: Mon May 02, 2005 8:14 am
Location: Pamplona, Colombia

Postby HPW » Thu Feb 15, 2007 12:56 pm

Which would be in fact one button which inserts one period on each selected line and one button which removes one period on each selected line.

Or consider this suggestion to start 'Tools' from within the action-editors:

http://www.neosoftware.com/forum/viewtopic.php?t=14752

Then you use any powereditor to similar things.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Sam Cox » Thu Feb 15, 2007 2:18 pm

I agree with Carlos that a block quote method would be useful. In the meantime, in my collection of Neobook notes I wrote the following:

Also serving as comments are blocks of text that cannot be reached by NeoBook's interpreter. For example, at the beginning of a subroutine you can 'GotoLine' around a block of comments:
Code: Select all
:SubroutineName
GotoLine "SubroutineNameBegin"

This line and the next are comments.
The "GotoLine" jumps over them.

:SubroutineNameBegin
.. code goes here
Return

The same idea can be used in functions and even in the code sections of objects. You can position large blocks of text between subroutines. For example:
Code: Select all
:Subroutine1
Return

These lines between subroutines can't be reached by the NeoBook interpreter and so can be used as comments.

:Subroutine2
Return

The 'Return' statement can be used in places other than subroutines. In a button's 'click' action, for example, comments can be placed after a 'Return.'
Code: Select all
HideObject "Magoo" "None" "0"
Return

These lines appearing after the button's 'Return' statement are unreachable by the NeoBook interpreter and are therefore usable as comments.
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby Odd » Fri Feb 16, 2007 12:08 am

Another idea, based on this one:

How about making blocks of action commands visible/invisible, in other words expanding/collapsing action blocks (particularly the startup and subroutine actions) in a "tree view", just like the objects are organized?

A nice option would then be expand all/collapse all.

We could even have an option to name the expandable/collapsable blocks?
User avatar
Odd
 
Posts: 81
Joined: Sat Apr 02, 2005 3:34 am
Location: Norway

Postby Wrangler » Fri Feb 16, 2007 9:49 am

I too would find this very handy. Sometimes when I want to rewrite code to make it faster, or add something to it, I will comment out the old code and try the new code below it. Keeping the old code commented out above it would allow me to return it to use should my new code not work out. By highlighting the code, and right click to select comment, or uncomment would be great.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA


Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron