On Tue, Sep 26, 2017 at 5:06 PM, Howard Page-Clark via Lazarus <lazarus@lists.lazarus-ide.org> wrote: > On 26/09/17 20:51, Marcos Douglas B. Santos via Lazarus wrote: >> >> I understood that I can use like this: >> const >> VALUE: string = 'áéíóú'; >> >> Not like this: >> const >> VALUE = 'áéíóú'; >> >> Right? >> But this is not compile: >> const >> V1: string = 'a'; >> V2: string = V1 + 'b'; > > You can't do that in a const declaration. > But in an implementation, the following does compile: > > {$J+} {$H+} > const > V1: string = 'a'; > V2: string = 'b'; > V3: String = ''; > > begin > V3:=V1 + V2; > WriteLn(V3); > end.
I know this trick that was deprecated a long time ago. A constant that can change... I think may be better not using constants in the code anymore. But thanks, anyway. Marcos Douglas -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus