Example:

  1. ' This sample program show the use of the Tan function

    Sub Main ()

    1. Dim Msg, Pi' Declare variables.

      Pi = 4 * Atn(1)' Calculate Pi.

      Msg = "Pi is equal to " & Pi

      MsgBox Msg' Display results.

      x = Tan(Pi/4)

      MsgBoxx & " is the tangent of Pi/4"

    End Sub