Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating new parameters question
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#1
Creating new parameters question

So I was learning about creating new functions in the wiki article. Now I was reading about it and I just made a function line like this.
int FUNCTION(sig 1, sig 2, and so on)
{
}

Like so right? But, how do I know that the new parameter will do exactly what I said, I mean what happens if something's wrong? Is it tested that it'll do exactly what I describe?

NOTE: I haven't test it, in fact I just found them today.

"Veni, vidi, vici."
"I came, I saw, I conquered."
07-30-2013, 11:11 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Creating new parameters question

The parser (or compiler) will exit with an error if the function is improperly formed or does not exist when called.

Tutorials: From Noob to Pro
(This post was last modified: 07-30-2013, 11:59 AM by Your Computer.)
07-30-2013, 11:58 AM
Website Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#3
RE: Creating new parameters question

^ this, but also...
Quote: how do I know that the new parameter will do exactly what I said
The parameter will do what you tell it to do in the logic of the function. Parameters are simply variables of a given type that you provide to the function when you call it, they don't 'do' anything in-and-of themselves
Quote: Is it tested that it'll do exactly what I describe?
You haven't 'described' anything for it to do. When you write some code in the function, you should have a good idea of how to test if it's working

07-30-2013, 04:06 PM
Find




Users browsing this thread: 1 Guest(s)