Yay, but you can also have function variables.
Ok for example, say you make a fucntionw here a user has to choose a
menu option.
Say taht option is called menu
You'd do soemthing like this
int menu() {
int userposition=0;
when you press down arrow userposition=userposition+1;
then
return userposition;
would make userposition a global variable
to get this value you'd have to use something like

option=menu();
that would call the menu function and give you what the user chose, as
the option var
Also it's not necessary to use all the different types of int, all you
need to know is void, int, double, and string.

On 3/24/10, dark <d...@xgam.org> wrote:
> I follow the printing business, ---- but I'm uncertain as to the "int first,
> int second business, sinse these don't seem to have been defigned, ---- also
> I'm a litle confused as to what a return statement is exactly for.
>
> I thought you make global variables and had your functions alter those.
>
> For instance, you start with int hp = 100. You setup a function to change
> this value, ---- then is it not changed until you setup another function to
> return it to 100 again?
>
> Beware the grue!
>
> Dark.
> ----- Original Message -----
> From: "Oriol Gómez" <ogomez....@gmail.com>
> To: "Gamers Discussion list" <gamers@audyssey.org>
> Sent: Wednesday, March 24, 2010 7:01 PM
> Subject: Re: [Audyssey] Bgt stuff that confuses me
>
>
>> I'm going to try to answer your questions:
>> 1. Void fucntions are functions that don't return anythin gI.e: No
>> return statements allowed.
>> 2. "3+5" in between quotes is going to be printed  as such.
>> Example:
>> if you say alert("3+5=8"); it's going to print exactly that. if you
>> said something like.
>> alert("hey "+3+5);
>> that would print 8 because you're putting it outside a string.
>>
>> hth
>>
>
>
> ---
> Gamers mailing list __ Gamers@audyssey.org
> If you want to leave the list, send E-mail to
> gamers-unsubscr...@audyssey.org.
> 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/gam...@audyssey.org.
> If you have any questions or concerns regarding the management of the list,
> please send E-mail to gamers-ow...@audyssey.org.
>

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
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/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to