Return

From Game Editor

Revision as of 18:46, 25 November 2009 by Asmodeus (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Use the keyword return to return something in a function.

Here is an example, which returns an integer value of the two numbers added together:

int AddTogether(int a, int b)
{
  return a+b;
}