View Single Post
  #13   Spotlight this post!  
Unread 27-03-2008, 19:35
starsROBOTICS starsROBOTICS is offline
Registered User
FRC #2276 (S.T.A.R.S)
Team Role: Engineer
 
Join Date: Mar 2008
Rookie Year: 2006
Location: texas, houston
Posts: 44
starsROBOTICS is on a distinguished road
Re: Where to go from here?

As someone who had some programming experience but not nearly enough, I found "Essential C" (a free PDF document) from Stanford's CS dept. to be particularly useful; you might want to take a gander at that.

Quick, generalized rundown:

Variables are quite a bit like "x", "y", etc in Algebra; they are little chunks of data read and manipulated in a program.

The easiest way (for me) to think of macros is as "find and replace" commands run at compile time by the compiler's preprocessor. They're used in various ways to make code cleaner and more organized (and programmers more sane [or less insane? ]).

Constants are variables stored in memory and read by the program just like any others, except that the programmer specifies them as unchangeable (thus constant), and the compiler will spit out an error if it finds code that tries to modify them.

Arrays are groupings of like variables (e.g. "unsigned int exampleArray[50];" declares a set of 50 unsigned integers, referred in the program as "exampleArray[0]", "exampleArray[1]", "exampleArray[2]" ... "exampleArray[49]" -- the counting goes 0-49 rather than 1-50).[/quote]

I can understand that but i need examples to explain to me what i need to use these functions for. Like are arrays used to help program relays? and what will it do to the relay? stuff like that
__________________