What's the difference between:
void main (int amount)
and
void main()
{
int amount;
}
?
Separate question: If I define something in a subprogram (feel free to correct the terminology) will it be defined in the other subprograms? If I define it in the main program will it be accessible by the subprograms?
I've tested this myself and it would seem that this is not possible but I can't rule out that I've made a mistake somewhere.
e.g.
void prog1()
{
item booze7;
}
void prog2()
{
booze7=$item[fine wine];
}
void prog3()
{
drink booze7;
}
void main()
{
prog1();
prog2();
prog3();
}
Thanks in advance.
void main (int amount)
and
void main()
{
int amount;
}
?
Separate question: If I define something in a subprogram (feel free to correct the terminology) will it be defined in the other subprograms? If I define it in the main program will it be accessible by the subprograms?
I've tested this myself and it would seem that this is not possible but I can't rule out that I've made a mistake somewhere.
e.g.
void prog1()
{
item booze7;
}
void prog2()
{
booze7=$item[fine wine];
}
void prog3()
{
drink booze7;
}
void main()
{
prog1();
prog2();
prog3();
}
Thanks in advance.