Page 1 of 1

Plz Help; Call Method(NXC)

Posted: 11 Dec 2011, 01:07
by onewinged
Hello,
hope I won't be reported as a spam :")

I just want to know what's the code line for calling and identifying a method||function ?

Re: Plz Help; Call Method(NXC)

Posted: 11 Dec 2011, 03:07
by afanofosc
Would you be willing to read the NXC Programmer's Guide or the NXC Tutorial? Or any C tutorial that you can find via Google?

Like C you simply call a function by typing its name followed by its parameters in parenthesis.

Code: Select all

// define a function
int foo(int x) { return x*x; }

task main()
{
  int x = 4;
  int y = foo(x);
  int z = foo(14);
}
I am not sure what you mean by "identifying" a function.

John Hansen