FIRST Forums  

Go Back   FIRST Forums > General Discussions > FIRST Programs > FIRST LEGO League > The Challenge > Programming

Reply
 
Thread Tools
  #11  
Old 05-13-2013, 11:56 AM
Dean Hystad Dean Hystad is offline
Senior Member
 
Join Date: Sep 2008
Location: Minnesota
Posts: 1,700
Default Re: Link comment to programming block

Quote:
Originally Posted by dna1990 View Post
I remind new folks of a previous tip by Dean that uses the Constant Block. It allows each constant to have your own 9-character 'label'. Doesn't do anything, it is just there for visual reference to the programmer. And they are nice and organge, against what is sometimes a stream of green and teal move/motor/my blocks.
Another option is to create your own inline comment block. The attached file shows a Comment MyBlock with four text input plugs. The comment is entered by selecting the comment block and typing the comment in as the values for the four inputs.

I created the block by wiring a four pairs of comment blocks together (four Variable Read blocks followed by four Variable Write blocks). I selected the Variable Write blocks and created the MyBlock. I opened the MyBlock and deleted the contents, leaving just the data plugs.

Advantages of the Comment MyBlock is that the comments are inline and follow changes to the code. Disadvantages are that you only have 80 characters (still much better than 9), and you can only see the comment when the block is selected in the NXT editor.
Attached Images
File Type: jpg Inline Comment.JPG (23.0 KB, 18 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data wires - Help please :) rich8848 Programming 11 10-11-2011 05:06 PM


All times are GMT -4. The time now is 05:53 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.