LOTUSSCRIPT LANGUAGE


Examples: Declare statement (forward reference)
' The forward declaration of the function Times allows the
' use of Times within the definition of the sub PrintFit.
' The function definition of Times appears later in the script.

' Forward declare the function Times.
Declare Function Times (a As Single, b As Single) As Single

' Define the sub PrintFit. It calls Times.
Sub PrintFit (lead As String, x As Single)
  Print lead$, Times (x!, x!)
End Sub

' Define Times.
Function Times (a As Single, b As Single) As Single
  Times = (a! - 1.0) * (b! + 1.0)
End Function

' Call the sub PrintFit.
PrintFit "First approximation is:", 13
' Prints "First approximation is:     168"

See Also