tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
28
Task/Copy-a-string/Pascal/copy-a-string.pascal
Normal file
28
Task/Copy-a-string/Pascal/copy-a-string.pascal
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
program in,out;
|
||||
|
||||
type
|
||||
|
||||
pString = ^string;
|
||||
|
||||
var
|
||||
|
||||
s1,s2 : string ;
|
||||
pStr : pString ;
|
||||
|
||||
begin
|
||||
|
||||
/* direct copy */
|
||||
s1 := 'Now is the time for all good men to come to the aid of their party.'
|
||||
s2 := s1 ;
|
||||
|
||||
writeln(s1);
|
||||
writeln(s2);
|
||||
|
||||
/* By Reference */
|
||||
pStr := @s1 ;
|
||||
writeln(pStr^);
|
||||
|
||||
pStr := @s2 ;
|
||||
writeln(pStr^);
|
||||
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue