Encyclopaedia Index

(t) Creation of new FN-subroutines

It may happen that GROUND users recognise the power and economy of using FN-type subroutines, but need one which does not appear in the library. In this case, they may care to create the subroutine which they need by copying, with appropriate changes, one of the examples provided in PHENC entry: FNxxx

Inspection of these listings will reveal that they differ in the numbers of LB's and real numbers in their arguments. Thus FN1, having one LB, calls L0F1 to get values of I and IADD; and so on.

Suppose that a GROUND user wished to create a function which would take the square root of the product of a second and a third arrayed variable and put it into the storage allocated to the first; the subroutine would probably appear as follows:

The following statement would then have to be inserted into the GROUND subroutine:

wherever necessary.