A closure for a window, a door or the like, wherein the window, the door or the like has a frame and a leaf movable with respect to the frame and the closure is configured for a releasable fixing of the leaf to the frame in the assembled state, wherein the closure comprises: a base body configured for fastening to the frame or to the leaf; a plurality of components (14, 19, 21, 26) movable with respect to the base body, wherein a plurality of functional states of the closure are defined by different positions of the movable components (14, 19, 21, 26); a sensor arrangement which is configured to monitor the different positions of the movable components (14, 19, 21, 26) and to output respective position signals; and an electronic evaluation device which is configured to receive the position signals and, on the basis of a comparison of the position signals with respective default values, to generate a status signal which indicates the instantaneous functional state of the closure, wherein the movable components (14, 19, 21, 26) comprise a closure element which is rotatably supported at the base body, which defines a holding receiver for a latch element fastened to the leaf or to the frame and which is movable between a release position releasing the latch element in an opening direction of the leaf and a blocking position blocking the latch element in the opening direction, with the sensor arrangement being configured to monitor the rotational position of the closure element, wherein the movable components (14, 19, 21, 26) comprise a locking slide which is displaceably guided in the base body between a locking position and an unlocking position and which is preloaded in the direction of its locking position by at least one spring, wherein, in the locking position, the locking slide prevents a movement of the closure element from the blocking position into the release position and, in the unlocking position, the locking slide permits a movement of the closure element between the blocking position and the release position, characterized in that the sensor arrangement is configured to recognize the locking slide located in the locking position and in the release position. a base body configured for fastening to the frame or to the leaf; a plurality of components (14, 19, 21, 26) movable with respect to the base body, wherein a plurality of functional states of the closure are defined by different positions of the movable components (14, 19, 21, 26); a sensor arrangement which is configured to monitor the different positions of the movable components (14, 19, 21, 26) and to output respective position signals; and an electronic evaluation device which is configured to receive the position signals and, on the basis of a comparison of the position signals with respective default values, to generate a status signal which indicates the instantaneous functional state of the closure, wherein the movable components (14, 19, 21, 26) comprise a closure element which is rotatably supported at the base body, which defines a holding receiver for a latch element fastened to the leaf or to the frame and which is movable between a release position releasing the latch element in an opening direction of the leaf and a blocking position blocking the latch element in the opening direction, with the sensor arrangement being configured to monitor the rotational position of the closure element, wherein the movable components (14, 19, 21, 26) comprise a locking slide which is displaceably guided in the base body between a locking position and an unlocking position and which is preloaded in the direction of its locking position by at least one spring, wherein, in the locking position, the locking slide prevents a movement of the closure element from the blocking position into the release position and, in the unlocking position, the locking slide permits a movement of the closure element between the blocking position and the release position, characterized in that the sensor arrangement is configured to recognize the locking slide located in the locking position and in the release position.