Home → Gambas One Forum → General → View topic Do something once Post Posted December 12th 2024, 1:24 AM Rating: #1 (In Topic #1385) thatbruce Regular Don't fill this field, it is here to catch spam-bots that fill in forms automatically @goodideasdeparmentFor donkeys years now, when I need something to happen just once, I have used the Code (gambas) Static Flag as Boolean = True If Flag Then DoTheOnceThing Flag = False Else DoOtherStuff EndIf I just had a 2cent thought, is there a better way?b Post Posted December 12th 2024, 9:03 AM Rating: #2 cogier Guru Why does 'Flag' have to be static? I have used a similar routine but the other way round. I can't think of a better way: - Code (gambas) Public Flag As Boolean If Flag Then DoOtherStuff Else DoTheOnceThing Flag = True Endif 1 guest and 0 members have just viewed this. Gambas One Forum → General → View topic