Share via


Warnings Property

Home Page (Objects)OverviewFAQReference

Applies to: Application object

Gets the number of warnings that occurred during the last build.

Syntax

object**.Warnings**

Parameters

object

An expression that evaluates to an Application object.

Return values

The Warnings property returns one of the following values:

  • –1   No build has occurred during this session of the IDE.

  • 0   No warnings occurred during the last build.

  • 1 or more   This many warnings occurred during the last build.

Remarks

The Warnings property is set immediately at the end of the build, before the BuildFinish event is fired. The value of the Warnings property will match the warnings parameter to the BuildFinish event.

Example

The following example tests whether a build has occurred, and displays a message box showing the number of warnings generated during the build:

if Warnings = -1 then
   MsgBox( "No build has occurred yet." )
Else
   if Warnings = 0 then
      MsgBox( "The last build was successful." )
   else
      MsgBox( "Warnings occurred during the last build." )
   End if
End if

See Also   Application::Errors property, Application::BuildFinish event.