DEBUG

Debug Expression [ { ; | ;; | , } Expression ... ] [ { ; | ;; | , } ]

Prints expressions to the standard error output, only if your program is compiled with debugging informations.

The location of the DEBUG line code is printed before anything else.

The expressions are converted to strings by the Str$ function.

  • If there is no semi-colon nor comma after the last expression, a newline character is printed after the last expression.

  • If the semi-colon is doubled, then a space character is printed between the expressions.

  • If a comma is used instead of a semi-colon, then a tab character (ASCII code 9) is printed to separate the expressions.

Example

Dim a As Float

= 45 / 180 * Pi
Debug "at 45 degrees the sine value is ", Format$(a, "0.####")
FMain.Form_Open.11: at 45 degrees the sine value is     0.7854

See also