Árvore de páginas

Você está vendo a versão antiga da página. Ver a versão atual.

Comparar com o atual Ver Histórico da Página

Versão 1 Próxima »

Abrangência
Versão 17.3.0.0 e superiores

A partir da versão 17.3.0.0 métodos estáticos estão disponíveis para TL++.




MetodoEstatico.tlpp
#include "protheus.ch"

class StaticMethod
	method new()
	static method staticExample()
	data dataI
endclass
 
 
method new() class ForWithProperty
	
return self


method staticExample() class StaticMethod
	conout("exemplo")
	/* conout(::dataI) //*/
return

main function tteci_142
  StaticMethod():staticExample()
return





#include "protheus.ch"

class StaticMethod
method new()
static method staticExample()
data dataI
endclass


method new() class ForWithProperty

return self


method staticExample() class StaticMethod
conout("oizinho")
return

main function tteci_142
StaticMethod():staticExample()
return

  • Sem rótulos