The DEF statement lets you define a single- or multi-line function. Examples DEF DOUBLE Add (DOUBLE A,B, SINGLE C,D,E) = A+B+C+D+E DEF DOUBLE Example (DOUBLE A,B, SINGLE C,D,E) EXIT DEF IF B = 0 Example = (A/B) + (C-D)^E END DEF
1 – Syntax
Single-Line DEF: DEF [data-type] def-name [([[data-type] unsubs-var-name],...)]=exp Multi-Line DEF: DEF [data-type] def-name [([[data-type] unsubs-var-name],...)] [statement]... { END DEF } { FNEND }