Copyright 2013 Louisiana Delta STEM Camp. Powered by Blogger.

Day 2: Robotics Programming Using Subroutines

Robotics Class: Programming Using Subroutines, Calls, and Comments

This morning's first lesson revolved around the importance of using subroutines and comments in programming.  Prof. Greer led the talk stressing the re-usability of subroutines in streamlining code.


By definition, a subroutine is a sequence of program instructions that perform a specific task, packaged as a unit. A subroutine is often coded so that it can be started (called) several times and/or from several places during one execution of the program, including from other subroutines, and then branch back (return) to the next instruction after the call once the subroutine's task is done.


Comments in computer programming are also beneficial to coders in that they annotate the code, highlighting important parts and describing what sections of code do.  This can be especially useful for a programmer who has not reviewed the particulars of a program in quite some time and may have forgotten what functions are performed within.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Post a Comment