3. Function You can write Functions in a program code that can be described with NA’s code editor, in addition to Subroutines. Functions are not to be registered in Action Settings as Subroutine, but can be called from a subroutine. Functions have data type attribution, and able to return the operation result by value. Also, they can take one or more variables as argument at run time. Subroutines don’t have own data type attribute, thus suitable for the process not concerning the result. [Example] Screen transition, sequential execution of plural subroutines On the other hand, Functions are suitable for the process judging the result and controlling because they have own data type attribute.
control according to the result [Example] Assigning different parameters to one operation expression in sequence to switch *1) If a subroutine has arguments, it cannot be assigned to Action setting. Generate a subroutine without arguments, and call a subroutine with arguments. Additional Information Processes, for example, making the same decision repeatedly in a subroutine are functioned. It enables to summarize decision processes and to reduce amount of program code. Also, functioned decision expressions make batch correction/change possible by modifying the expressions in the function.
32 Item Allocation to Action Configuration Call from subroutine Subroutine 〇 〇 Action × 〇 Item Argument Return value Subroutine ×/〇*1 Not mandatory Action 〇 Mandatory