Hi Bryan,
Ah, I see. Now, that is a big problem since programming in general is
based upon Algebra. in Algebra they use variables such as x instead of a
number to perform some kind of math. Well, in programming the concept
applies throughout the development process, not just with math, but in
comparing states of this or that. Though, one difference in programming
instead of a simple variable like x you can give your variables real
names like health, weapon, and ammo.
if (weapon ==1)
{
FirePistol();
}
if (weapon == 2)
{
FireMagnum();
}
if (weapon == 3)
{
FireShotgun();
}
If I wanted to I could have used a more Algebra like expression and
removed the word weapon and replaced it with x. However, that would make
the code less self-explanitory, but no matter which way you want to
write it the concept of using variables instead of numbers is based on
Algebra. It is just a slightly more safisticated way to do an
expression. For example let us try a simple math formula.
3 = x+2
We don't know what x is here but we know the answer is 3 and one of the
numbers is two. So we would rewrite the formula
x = 3-2
which has the answer 1.
In programming we can write a simple formula like
z = x+y
and plug numbers into x and y and return the result for z just as easily.
Smile.
Bryan Peterson wrote:
Well the Algebra is the very thing I hae issues with, particularly
when there are letters involved. I just never could get the hang of
it. It's quite a long story actually.
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [EMAIL PROTECTED]
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[EMAIL PROTECTED]
If you have any questions or concerns regarding the management of the list,
please send E-mail to [EMAIL PROTECTED]