Vocab

I would describe a loop as being a set of code that repeats until a variable is is either true or false which then terminates it. Or something like that.
 
Common PHP Operators(remove square brackets):

++
increments integer variable
--
decrements integer variable
==
does equal
!=
does not equal
>
greater than
>=
greater than or equal to
<
less than
<=
less than or equal to
||
or
&&
and
.=
append

example of append:

$hello = "Hello ";
$world = "World!";
$hello .= $world;

hello variable now equals "Hello World!"

+=
add/equals

example of add/equals:

$int = 2;
$int += 8;
int variable now equals 10, the same as $int = 2 + 8;

will update with more at some later point
 
Common PHP Operators(remove square brackets):

[++]-----increments integer variable
[--]-----decrements integer variable
[==]-----does equal
[!=]-----does not equal
[> ]-----greater than
[>=]-----greater than or equal to
[< ]-----less than
[<=]-----less than or equal to
[||]-----or
[&&]-----and
[.=]-----append
example:

$hello = "Hello ";
$world = "World!";
$hello .= $world;

hello variable now equals "Hello World!"

[+=]-----add/equals
example:

$int = 2;
$int += 8;
int variable now equals 10, the same as $int = 2 + 8;

will update with more at some later point

Thanks.
 
2009? If I didn't know any better I would say that I must be getting pretty old.

Anyway, I'm looking to apply some CPR here, can anyone come up with a really nice definition for any of these?
class
object
framework
library
interface
exception
pointer
stack
queue
 
2009? If I didn't know any better I would say that I must be getting pretty old.

Anyway, I'm looking to apply some CPR here, can anyone come up with a really nice definition for any of these?
class
object
framework
library
interface
exception
pointer
stack
queue

Off the top of my head:
Exception - A specific condition that is met during program execution; generally used for generating error messages, but can also be used for branching to a different execution path of the program.

Pointer - A variable that is linked to, or "points to", a specific memory address / block of addresses. Is used to directly modify the memory or memory space that a variable is associated with.
e.g. C++
Code:
int x = 4.      //create variable
int *ptrY;    //create pointer
ptrY = x;    //assign pointer to variable x's memory space
cout << ptrY << endl;  //prints hex address of ptrY and x, e.g. 0xc444
cout << *ptrY << endl; //prints value of x; will print 4
*ptrY = 6; //dereference ptrY, and assign value of 6; overwrites value stored in x
cout << *ptrY << endl; //print value of ptrY; i.e. 6
cout << x << endl;  //print value of x, i.e. 6

Stack - a set of variables, objects, etc. laid out consecutively in memory. Uses FILO concept (First In, Last Out). The first variable in, will be the last one "popped" off the top of the stack. Usually has the following functions / methods associated with it:
Insert (or push)- insert value on top of stack
Delete (or pop) - removes value on top of stack
Print - prints value on top of stack, or all values in stack
e.g.
stack-sketchy.png


Queue - Similar to a stack, except uses FIFO concept (First In, First Out).
Think of it like a line (or queue) of people waiting for a ticket. The first person in line will receive their ticket before the person that comes in line after them.
 
Back
Top Bottom