0
In javascript we can write this in several ways:
(function () {
console.log("Olá");
})();
(function () {
console.log("Olá");
}());
! function () {
console.log("Olá");
}();
void function () {
console.log("Olá");
}();
I am working on a project in vb6, and I wanted to use something like a self-invoke function to not need to declare a function in the overall scope of my form, summarizing I want to call a function to which I will only use once within this function and will not use more.
Does anyone know if there is a way to do this without using gambiarra?
I found this not ideal, but it solved my problem https://www.thevbprogrammer.com/Ch05/05-05-GotoAndGosub.htm
– Alvaro Alves