This function returns one if the specified subprogram has been loaded into memory and zero if it has not. The subprogram name must be specified in Proper Case with only the first letter in capitalized.
The string expression specifying the subprogram name is called a subprogram pointer because it "points" to the subprogram rather than explicitly naming it. As the expression changes, the pointer points to different subprograms. The following example illustrates how this can be useful.
10 SUB Xform(X(*))
20 Method$="Xform"&VAL$(RANK(X))
30 IF NOT INMEM(Method$) THEN LOADSUB Method$
40 CALL Method$ WITH(X(*))
50 DELSUB Method$
60 SUBEND
In HTBasic, subprogram pointers can also be used in CALL, DELSUB, LOADSUB and XREF statements.