PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 25 → Função semelhante Exit Sub (VB6)
Função semelhante Exit Sub (VB6)
Iniciado por ANDRE MARTINI / IS2, 16,mar. 2016 13:22 - 3 respuestas
Miembro registrado
213 mensajes
Popularité : +25 (25 votes)
Publicado el 16,marzo 2016 - 13:22
Olá pessoal,

tem uma função no vb6 que uso bastante chamada Exit Sub, existe algo semelhante no windev?

PRIVATE Sub Cta_0003F9()
IF Not Atualizar_saldos THEN
MsgBox "Não é necessário atualizar saldos desta conta!", vbExclamation, "Aviso"
Exit Sub
END IF
...


eu gosto de usar esta função pois posso colocar alguns IFs de validação no início da procedure e sair dela dentro destes IFs, eu não gostaria de colocar toda a rotina dentro do ELSE.

--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html
Miembro registrado
123 mensajes
Popularité : +46 (46 votes)
Publicado el 16,marzo 2016 - 13:40
Aqui esta todas as opções disponíveis par ao IF do Windev

http://help.windev.com/en-US/…

--
Atte. Willian Fernando
Miembro registrado
213 mensajes
Popularité : +25 (25 votes)
Publicado el 16,marzo 2016 - 13:58
não é o IF o problema, eu quero saber se existe algo semelhante a função Exit Sub do VB6 no windev?

Exemplo, se eu tenho uma procedure e quero sair da execução da procedure sem executar o restante a partir de um determinado ponto da procedure, como fazer isso?

--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html
Miembro registrado
213 mensajes
Popularité : +25 (25 votes)
Publicado el 16,marzo 2016 - 14:06
Encontrei. RETURN

IF CBOX_Atualizar_saldos = False THEN
Warning("Não é necessário atualizar saldos desta conta!" + CR + CR + "Campo [Atualizar Saldos] está desmarcado.")
RETURN
END


--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html