Can delphi do template literals like js ?
Can delphi do template literals like js ?
e.g
Var x = "John"
Var Msg = `Hello {x} thank you for coming today`
The same can be done in C#, but I can't find if delphi can do this or not
e.g
Var x = "John"
Var Msg = `Hello {x} thank you for coming today`
The same can be done in C#, but I can't find if delphi can do this or not
If you could provide some context it would be better. There's a lot of things you can't do in Delphi in your example: Initialize a variable, declare a variable in the middle of a block, and replace {x} with the variable content.
ReplyDeleteOn the other hand, there's a lot of things delphi can do (that JS can't) that helps improve code readability, localization , memory management to name a few.
Clement Doss You can initialize a global variable in Delphi.
ReplyDeleteUwe Raabe Yeap. But do you know if x is global?
ReplyDelete