PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 25 → Função semelhante Exit Sub (VB6)
Função semelhante Exit Sub (VB6)
Iniciado por ANDRE MARTINI / IS2, mar., 16 2016 1:22 PM - 3 respostas
Membro registado
212 mensagems
Popularité : +25 (25 votes)
Publicado em março, 16 2016 - 1:22 PM
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
Membro registado
123 mensagems
Popularité : +46 (46 votes)
Publicado em março, 16 2016 - 1:40 PM
Aqui esta todas as opções disponíveis par ao IF do Windev

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

--
Atte. Willian Fernando
Membro registado
212 mensagems
Popularité : +25 (25 votes)
Publicado em março, 16 2016 - 1:58 PM
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
Membro registado
212 mensagems
Popularité : +25 (25 votes)
Publicado em março, 16 2016 - 2:06 PM
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