Poll

Which coding langauge is best for learning Torque?

C++
Java
Niether, does not matter

Author Topic: C++ and Torque Script  (Read 3723 times)

except he did declare add, it's a function just below main. the parameters are two integers too so i don't see a problem there. though i am pretty sure cout is << and cin is >> but i can never remember.
you're joking right

edit: you can't use a function that in terms of the program running, doesn't exist yet.
the parameters aren't the issue. the operators for cout/cin are backwards.
« Last Edit: March 26, 2013, 07:08:40 PM by Kaphonaits² »

But it has to be declared above main
yeah wasn't sure, in C it doesn't so i wasn't sure.

yeah wasn't sure, in C it doesn't so i wasn't sure.
well you could not declare it before it's used.

it's like saying you could intentionally gouge your eyes out with a fork, but why would you do that?

declare it before : declare it after :: intentionally gouge your eyes out : ??

declare it before : declare it after :: intentionally gouge your eyes out : ??
you're no fun.

it's stupid to not declare/define a function before use.

well don't look at me, i wasn't the one that did it.
in C i always prototype the extra functions, then make main, then have the actual functions below main.
i would guess prototyping is still available in C++, but is it less necessary than in C?

well don't look at me, i wasn't the one that did it.
in C i always prototype the extra functions, then make main, then have the actual functions below main.
i would guess prototyping is still available in C++, but is it less necessary than in C?
there's nothing wrong with defining them below main - as long as they're declared (prototyped) before use.

in (good) C++ most, but not all of your functions will be apart of a class.

Torquescript is very similar in terms of syntax to C#, so it's best to learn java (as it's the closest to C#) if you want to use another language as a stepping stone to torque.

Not that it would be considered a stepping stone, more like a waterfall.

I don't understand what you mean by java being "slow," what does that mean? Also is java THAT bad of a language? How so?

If you want to learn about Torquescript, you should check out the Coding Help and General Modification Help boards. Search for tutorials in there.

If you want to learn about Torquescript, you should check out the Coding Help and General Modification Help boards. Search for tutorials in there.

Thing is though, I want to work with it while I learn. I don't want to just look at examples, I actually want to do them.

Java is a very powerful language and it's extremely fast, it's also very flexible to your formatting style, it is far more powerful and faster then C++.

Java is a very powerful language and it's extremely fast, it's also very flexible to your formatting style, it is far more powerful and faster then C++.
are you loving kidding me

are you loving kidding me
Not at all. Java isn't as handicappedly slow as everyone makes it out to be, it's all up to the coders to make optimizations.

Not at all. Java isn't as handicappedly slow as everyone makes it out to be, it's all up to the coders to make optimizations.
Sure it's not that slow, but it certainly not as fast as C++