oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Glossary for Seth Roby's Cocoa Series

by Seth Roby

This is the glossary for Go With The Flow, Tutorial #3 in Seth Roby's ongoing Cocoa series


The bits of data that are given to a function to work with (it's input). During the function call, they are listed inside the parentheses. During the function definition, they are defined with types and names inside the parentheses.

Argument Passing

The term used for giving values to the arguments in a function you are calling. For example, in:

myFunction(3+2, "Simon");

The arguments are being passed as 5 and the string "Simon".

Assignment Operator

The equals sign, one example of an operator. This takes everything to the operator's right until a semicolon, evaluates it, and sets the variable that is to the immediate left of the operator to that value. First seen in lesson 1.

Binary Operator

An operator that works with two operands, one on each side of it.


A one or a zero. A group of eight bits is a byte


A section of code between an opening curly brace '{' and a closing curly brace '}'. These can nest, so you can have a block inside another block. In general, a block can replace any line of code.

Boolean And

The binary operator '&&', which evaluates to TRUE if and only if both the conditions on either side of it evaluate to TRUE.

Boolean Or

The binary operator '||', which evaluates to TRUE if either of the conditions on either side of it evaluate to TRUE, or if both evaluate to TRUE.

Boolean Logic

The branch of logic that determines if statements are TRUE or FALSE. This duality of yes and no is very computer-savvy, being binary (only two values).

Boolean Value



The name that the developer tools give to compiling code.


a group of eight bits

C String

A type of string that is used often by C.


A type that represents one letter, number, or symbol that can be written with a keystroke.


In code, a part that is meant to be read only by humans and not to have meaning to the compiler. Like whitespace, the compiler simply ignores comments, which lets you put anything you want in them.

Comparison Operator

A binary operator that compares its operands and evaluates to a boolean value.


Translating the code you wrote in a half-english, half-computerese into full computerese, called 'machine code' that the computer understands and can run.


A program on the computer that translates your code into machine language. Does the compiling.

Compile Time

The time when the compiler is translating the code to machine language so that it can be run.

Compound Condition

A set of conditions joined by logical operators such as 'and', and 'or'.


The part of a conditional or loop that tells it when to start or stop (depending on the type of conditional or loop). It evaluates to a boolean value.


A construct that makes code happen only when certain conditions are met. if/then is such a construct, as is switch.


Data that could be in variables that is instead typed directly into your code. Numbers and strings are the most common variable types that are expressed as constants.

Conversion Specification

A special string that contains a percent character, then a letter or number that defines a type. Used in format strings to determine how to describe the output string.

Disclosure Triangle

A standard widget that no one ever knows the name of. The little triangle that accompanies folders to show if they are expanded of not.

Decrement Operator

The operator '--', which when appended to an integer variable will decrease that variable's value by one.

Developer Tools

The programs that Apple makes available to developers so that they can program for the Macintosh. The primary developer tool in versions of Mac OS X up to Jaguar is Project Builder, and after that it became Xcode.


A message that the compiler will give you when you have code that does not compile. Unlike warnings, you cannot run your code if you have errors.

Errors are usually displayed by the developer tools in red.

Escape Sequence

A string used to represent characters not normally available as keystrokes. In C these begin with a slash character, '\' and are followed by another character which distinguishes which character the sequence stands for. \n is a newline, \t is a tab. There are many more.

Equality Conditional

The operator '==', which evaluates to TRUE if the operands are equal. Not a single equal sign becuase that's used to assign values to variables.


To call all functions and substitute in all variable's values. This happens at run time.


A boolean value, the opposite of TRUE. 0 is read as FALSE. See also NO.

Flow of Control

The order in which code is executed. Can be changed with conditionals and loops.

Format String

A special type of string that describes a string, by including conversion specifications inside of it. Used by printf() and NSLog(), and many other functions.


A sections of code that can be called from other code. In C you must declare the function before any code that calls it (or get a warning) and define the function somewhere in the code (or get an error).

Functions take inputs called arguments that can change how they work internally.

Functions have an associated block of code called the function body that defines the code that the function does.

Functions can return a value of any type to the code that calls it.

Note that functions have a distinction between declaration and definition, whereas a variable has none; declaration and definition are identical.

Function Call

A means by which one part of a program can call another part of a program. This makes it easy to use the same code over and over again, without having to rewrite it over and over again. Uses a syntax such as:

name(argument1, argument2)

where the function's name preceeds the parentheses, and all arguments are listed in the parentheses and separated by commas.

Function Body

The block of code in a function definition that defines the code that that function executes.

Function Declaration

A line of code that tells the compiler that a function exists, so that the compiler will not complain if you use that function. Has the form:

returnType functionName(argType argName1, argType argName2);

This can usually be copied and pasted from the functon definition.

Function Definition

Code that defines exactly what a function does. Has the form:

returnType functionName(argType argName1, argType argName2) {
	//function body

When the function is called, The arguments are implicitly defined in the function body, and take on the values passed into them by the function call.

Greater-Than Operator (aka '>')

The binary operator '>', which evaluates to TRUE if the left operand is greater than the right operand.

Increment Operator

The operator '++', which when appended to an integer variable will increase that variable's value by one.


The information that goes into a function, program, etc. The opposite of output.


A type that represents a whole number, without any decimal part. Declared with the keyword int. 5, -23, and 17,000 are all integers, while 2.3, .9, and pi are not. An integer can optionally be unsigned, which means that it must be positive.

Less-Than Operator (aka '<')

The binary operator '<', which evaluates to TRUE if the left operand is less than the right operand.

Line Number

A way of referencing a specific line of code. Line numbers always begin at the start of the file with the first line numbered one. You will often see line numbers in the format MyKeenFile.c:23, with the filename before the colon and the line number in that file after it. In the Developer Tools the line number is displayed at the top of any editor window in this format.


A construct that makes code happen many times.


A boolean value, the opposite of YES. 0 is read as NO. See also FALSE.


A token that has a special meaning to the compiler. Operators are the verbs of C, and they act on the other tokens around them.


The inputs for an operator.


The information that comes out of a function, program, etc. The opposite of input.


The name Apple's Developer Tools gives to a program under development. When you create a project, the developer tools create a folder for any code files to live in, as well as a project file (which is really a package). Any support files will also go into this folder.

Project Builder

The primary Developer Tool for versions of Mac OS X up until Panther's release. Formerly known as ProjectBuilder (no space).


The act of a function giving its results to the code that called it. Every function returns the type of data it is defined to return. Use the command return to accomplish this. It is good practice, though not required, to have return on the last line of the returning function.


Making your code do whatever it is your code does. Once the code is compiled, the computer can run the code like it runs any other application. You can even go into the terminal and launch the code.

Run Time

The time when the program is actually running, after all code has been compiled.


A section of code, usually when offered to someone. Can be a block, but doesn't have to be.


A list of characters that make a bit of text.

Ternary Operator
An operator that operates on three operands. There is only one such operator, so it is often called 'the ternary operator', since 'the question-colon operator' sounds dumb.

In code, everything that is not whitespace is a token. Each section of text between sections of whitespace is a seperate token. This is a more general term than 'word', because an equal sign is also a token, but might not be counted as a word by some.


A boolean value, the opposite of FALSE. Anything other than 0 is read as TRUE. See also YES.


A way of interpreting data. Every variable has a type that tells the computer how to interpret the bits that the variable really represents. There are many different types defined in C, and the programmer can define his own types as well.


A section of memory that is set aside to hold some specific information. Variables are created with a variable definition, and afterwards are referenced by name, which much be one token. Every variable has a type assigned to it, to tell the computer how to read the variable.

Variable naming in C follows a standard that takes all the words in the name, capitalizes them, and takes out the spaces. The first letter is not capitalized. So a variable that represents the 'Number Of Doodads to Make' would be called 'numberOfDoodadsToMake'. Note that this is not a requirement, but it makes your code easier to understand to the rest of the world.

Varible Assignment

A line of code that assigns a value to an already-created variable.

Varible Declaration

A line of code that creates a variable with a specific name and type. It can be combined with a variable assignment in the same line.

Varible Definition

See variable declaration. Note that variables have no distinction between declaration and definition, becasue once a variable has a name and a type it is declared and defined, whereas a function must have separate declaration and definition.


A message that the compiler will give you when it detects something possibly wrong with your program. A warning is not definitely a problem, but it is a questionable bit of code and the compiler is telling you to watch out. Unlike errors, you can still run with code that makes warnings, but they may lead to errors or crashes in your code at run time.


Spaces, Tabs, and Returns are collectively referred to as whitespace. In code, whitespace is ignored by the compiler, and so can be used to deliniate sections of code, or make code more readable to people.


The primary developerer tool provided by Apple starting with Panther.


A boolean value, the opposite of NO. Anything other than 0 is read as YES. See also TRUE.

Seth Roby graduated in May of 2003 with a double major in English and Computer Science, the Macintosh part of a three-person Macintosh, Linux, and Windows graduating triumvirate.

Return to Go With the Flow

Return to