Last active
June 4, 2021 18:03
-
-
Save viniciussanchez/cf4fe159d7290acb2cdad83a0601d261 to your computer and use it in GitHub Desktop.
Class Operator Implicit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
TVenda = record | |
Valor: Currency; | |
class operator Implicit(AValor: string): TVenda; | |
end; | |
var | |
LVenda: TVenda; | |
begin | |
LVenda := '300'; | |
end; | |
{ TVenda } | |
class operator TVenda.Implicit(AValor: string): TVenda; | |
begin | |
Result.Valor := StrToCurr(AValor); | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment