tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
15
Task/Copy-a-string/Delphi/copy-a-string.delphi
Normal file
15
Task/Copy-a-string/Delphi/copy-a-string.delphi
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
program CopyString;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
|
||||
var
|
||||
s1: string;
|
||||
s2: string;
|
||||
begin
|
||||
s1 := 'Goodbye';
|
||||
s2 := s1; // S2 points at the same string as S1
|
||||
s2 := s2 + ', World!'; // A new string is created for S2
|
||||
|
||||
Writeln(s1);
|
||||
Writeln(s2);
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue