Syntax for Function?

  • Hi,

    Can you please tell me what is the syntax for user defined function?


    For Eg

    .DEF testfunction(.apple,.orange)

    .Result=.apple+.Orange

    Return .Result

    .END


    whatis=testfunction(3,2)


    so whatis will be 5. I made a syntax error in user defined function.


    Can you please tell me what is the function of the user defined function?

  • Alexandru is correct.


    However, Kawasaki just uses CALL instructions to call in individual programs (subroutines) so they could be 'loosely' referred to as possible functions as you can call subroutines with parameters.


    .PROGRAM main();

    whatis = 0

    CALL addvals(whatis,3,2)

    PRINT whatis

    .END


    .PROGRAM addvals(.a,.b,.c)

    .a = .b+.c

    RETURN

    .END

Advertising from our partners