with reference to fig1 to 5 , a lock of the kind to which the invention is applied includes , in an embodiment , a stator 1 having a cylindrical bore 2 for a rotor 9 ; along bore 2 extends , at least in correspondence of the programming device , a longitudinal side groove 3 . in the represented embodiment , stator 1 has a recess 4 for receiving a ring 5 with a web 6 forming the operative member of the lock , but in other embodiments this web 6 can be replaced by different members , for example by a key as represented in fig6 to 8 . stator 1 also has vertical channels 7 and 8 intended to house counterpins 31 of the lock . rotor 9 is cylindrical and it has a keyhole 10 for inserting a key c . rotor 9 is installed inside bore 2 of stator 1 . rotor 9 includes a series of first seats 12 which intersect the keyhole 10 for the key c , and it includes a series of second seats 13 , parallel to the first seats 12 , a first slot 14 and a second slot 15 , orthogonal with respect to said seats and parallel to the rotor axis . for each unit of the programming mechanism , a key follower 16 is inserted with longitudinal and transversal mobility in one of said first rotor seats 12 for cooperating with the conformations of a key c inserted in said keyhole 10 . the key follower 16 is provided on one side with projections 17 and on the opposite side with an element 18 for sliding engagement , and it is associated with a spring 19 which stresses the key follower towards the keyhole 10 . a locking pin 20 is slidingly inserted in one of said second rotor seats 13 , and it is provided with a series of first recesses 21 facing said projections 17 of the key follower 16 , and with a series of second recesses 22 turned on the side opposite said key follower 16 . a stop bar 23 is inserted in said first rotor slot 14 , and it has projections 24 facing said second recesses 22 of the locking pins 20 , and a projection 25 turned on the side opposite said locking pins and suitable for cooperating with said stator groove 3 . the stop bar 23 is associated with first springs 26 which stress the stop bar outwards . a change bar 27 is inserted in said second orthogonal rotor slot 15 , and it is provided with slidable engagement elements 28 engaged with said sliding engagement elements 18 of the key followers 16 , and with a projection turned on the side opposite the key followers 16 and suitable for cooperating with said stator groove 3 . in the known embodiment shown in fig1 to 4 , a counterpin 31 is inserted in the stator channel 8 for cooperating with the locking pin 20 . the counterpin 31 is pushed by a spring 32 which , by means of a little block 33 , rests against a retainment bar 34 inserted in a corresponding stator hole . such counterpins 31 may be foreseen in order to give more strength to the lock , however they are not necessary and may be omitted . it is to be remarked that the change bar 27 , in the known embodiments , is associated with springs which stress the change bar outwards . such springs , or at least a part of them , may be omitted in certain embodiments of the present invention , as described later on . according to the invention , the lock includes a security device intended to prevent a faulty execution of a change operation . this security device operates by preventing the inward displacement of the change bar in the case that the key intended to establish the lock programming has been inserted in an incomplete manner . an embodiment of the security device according to the invention is represented in fig1 and 14 . according to fig1 , the key c is in the change position , but it is only partially inserted , whereas according to fig1 the key c is completely inserted . the security device comprises a stop member shaped as a plate 53 mounted at the distal end of rotor 9 . plate 53 can displace within a guide member 55 perpendicular to the axis of rotor 9 and to the displacement direction of the change bar 27 . plate 53 is susceptible of assuming a first position , represented in fig1 and it is stressed towards this first position by a spring 56 . in this first position plate 53 prevents , by its own shoulder 54 the inward displacement of the change bar 27 . therefore , if the key c has not been completely inserted , the change bar 27 retains engaged with its projection in the groove 3 of stator 1 , and rotor 2 cannot be displaced from the change position . if , on the contrary , the key c has been inserted in complete manner into rotor 2 , as according to fig1 , the distal end portion of key c , always having an inclined surface , repels plate 53 against the action of spring 56 into the second position , in which the shoulder 54 does not hinder the inward displacement of the change bar 27 . therefore this latter can displace inwards as a consequence of the rotation of the key c , and the new lock programming is then established . in this way , a faulty execution of the change operation , due to an incomplete insertion of the key intended for the new programming , is certainly prevented . as already said , according to a feature of the invention the springs stressing outwards the change bar may be at least partially omitted , in order that the key cannot be unintentionally extracted when in the position of change . in this case , the operation of the described mechanism is as follows : in the absence of a key ( fig2 ), the locking pins 20 and possible counterpins 31 pass through the coupling surface between stator 1 and rotor 9 , and they prevent the rotor rotation . the locking pins 20 are rendered solid with the key followers 16 by the mutually engaged toothings 17 and 21 . under action of springs 26 , the stop bar 23 is inserted with its projection 23 in the stator groove 25 , and therefore the toothings 22 and 24 are mutually disengaged and the displacement of the locking pins 20 along with the key followers 16 is free when a key is inserted or extracted . when the correct key is inserted ( fig3 ), the end portions of the locking pins 20 ( and possible counterpins 31 ) are brought to correspond to the coupling surface between stator 1 and rotor 9 , whereby rotor 9 can be rotated by 360 ° in order to operate the lock . when effected this rotation , all elements take again their initial positions , and the key can be extracted . when , on the contrary , rotor 9 is rotated by 180 ° into a change position ( fig4 ), the change bar 27 is situated with its projection corresponding to the stator groove 3 . however , in the at least partial absence of springs stressing the change bar 27 , this latter is not completely displaced outwards and at least some toothings 17 of the key followers 16 remain engaged with the teeth 21 of the locking pins 20 , which are blocked in their position by the stop bar 23 which , no more corresponding to the groove 3 , maintains mutually engaged the toothings 22 and 24 . therefore , in this position it is not possible to unintentionally extract the key c and lose the lock programming . if , on the contrary , the user who is willing to program in a different manner the lock effects from outside a maneuver which brings the change bar 27 to displace outwards by entering its projection into the stator groove 3 , as shown by fig5 , the elements 18 and 28 of sliding engagement , mutually engaged , displace in transversal direction the key followers 1 . 6 by mutually disengaging the toothings 17 and 21 , whereas the stop bar 23 still blocks the locking pins 20 in their positions . therefore , in this position it is possible to extract the key , and then all key followers 16 are pushed by springs 19 at the end of their strokes , and the lock loses its former programming . by then inserting a new key , the key followers take a programming position corresponding to this new key . by rotating again rotor 2 by 180 °, the lock takes again its initial position according to fig3 , but now it is programmed according to the codification of the new key . in addition to the described programming mechanisms , the lock may include mechanisms with locking pins and counterpins of conventional type , which in the example are represented by locking pins 41 inserted into bores 11 of rotor 9 , by counterpins 42 , springs 43 and rest blocks 44 inserted in channels 7 of stator 1 and kept in place by retainment bars 35 . these per se well known mechanisms can be adopted with advantage in addition to the programming mechanisms , but a lock according to the invention can well be realized without making use of mechanisms of this type . in a similar manner , if desired , in the lock according to the invention may be included the mechanisms characteristic of the locks with master keys , wherein the locking pins 45 are divided in two or more sections in their regions near the surface separating them from the counterpins 46 . figures from 6 to 12 show a particular embodiment of the change means intended to push outwards the change bar 27 when the user , after having brought the key c in the change position , intends to effect a new programming of the lock . fig6 shows in perspective the lock along with the corresponding key c which has not yet been inserted into the lock . as it may be remarked , stator 1 has , next to the opening of keyhole 10 , a hole 49 facing the change bar 27 . this is better observable in fig7 , wherein a portion of stator 1 has been removed for representing the inner parts . fig7 shows the lock with the key inserted into the lock . the key c has displaced , corresponding to its codification , the key followers 16 of the lock , of which are visible here only the elements 18 of sliding engagement , but the change bar 27 has not displaced outwards , whereby the key c cannot be extracted by inadvertence . fig7 also shows a change member formed by a change shaft 50 provided with a handle ring 51 . here , this change shaft has not yet been inserted into the lock , and it is intended to be introduced in the hole 49 for allowing programming the lock . in fig8 the change shaft 50 has been inserted into the lock by introducing the same into the hole 49 . the change shaft has operated onto the change bar 27 by displacing the same outwards . the change bar 27 , by acting as represented in fig5 , has dragged with them the key followers 16 of the lock by acting on their engagement elements 18 , and has disengaged the key followers from the locking pins , which are always retained by the stop bar . therefore , the key followers are now free to displace along their own longitudinal direction , and they do not hinder extracting the key and then inserting a new key , which will operate the new lock programming . after removal of the change shaft 50 the lock , which is now programmed according to a new codification , takes again its normal operation and , in particular , the key rotation , by bringing the change bar 27 out of the correspondence with the groove 3 , causes an inward displacement of the change bar and , as a consequence , a new engagement of the key followers with the locking pins of the lock . fig9 shows a particular embodiment wherein the change bar 27 cooperates with a single spring 30 . spring 30 stresses the change bar outwards and it is situated near the end of the change bar 27 which is far from the opening of the keyhole . as a consequence , in the change position the change bar 27 takes an inclined position , as represented , in which it retains the engagement between the key followers and the locking pins in the region near the opening of the keyhole . this is sufficient for preventing a unintentional extraction of the key c . moreover , at its end turned toward the opening of the keyhole ( and therefore corresponding to the formerly described hole 49 ) the change bar 27 has an inclined portion 52 on which is intended to operate the change bar 50 for displacing outwards the change bar as a direct consequence of its insertion , as represented in fig1 . as already described , the displacement outwards of the change bar 27 disengages the key followers from the locking pins of the lock , thus allowing the extraction of the key and the insertion of a new key , with the consequent new programming of the lock . as an alternative to the embodiment described and preferred , it is possible to provide a short change shaft 50 permanently inserted within the hole 49 and lightly projecting from the front surface of rotor 9 , or from a recess thereof , by forming a push - button whose pressing replaces the described introduction of the change member 50 - 51 . as it may be remarked , the application of the invention does not worsen the inevitable complexity of a lock of the king taken into consideration , whereby the manufacture of the lock according to the invention is relatively easy and advantageous . in addition , the lock programming operations effected by the user become of the greatest simplicity and , at the same time , they offer the greatest security . is remarkable the fact that , because there is no need of using special keys for programming the lock , this latter can be designed in such a way that it accepts normal keys offered by the market , and this fact is very advantageous from the technical and commercial points of view . it should be understood that this invention is not limited to the embodiment described and shown as an example . several possible modifications have been pointed out in the course of the description , and others are within the ability of those skilled in the art . these modification and others , and any replacement by technically equivalent means , can be made to what has been described and shown , without departing from the spirit of the invention and the scope of this patent as defined by the appended claims .