Next Previous Contents

5. Write your function

5.1 Without argument

To create a function without argument you only need to declare it in the declaration file. I've write some example. Please respect space :

name_of_function [
/* nqc code here */
]

5.2 With an argument

Description

To declare an argument you only need to put arg at the declaration and all "arg" will replace by your argument. The argument can be a word. Like this : (respect space)

name_of_function arg [
/* nqc code */
OnFwd(OUT_ arg ); /* if you do this, you'll call the function as this way : name_of_function A */
]

Remark :

You *** NEED *** to insert space before and after " arg " declaration.

If you want to insert space before argument (like task declaration) you need to insert a letter before. See multitask declaration for more information.

Only Multiline commentar are allowed.


Next Previous Contents