tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
2
Task/Copy-a-string/Ada/copy-a-string-1.ada
Normal file
2
Task/Copy-a-string/Ada/copy-a-string-1.ada
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Src : String := "Hello";
|
||||
Dest : String := Src;
|
||||
3
Task/Copy-a-string/Ada/copy-a-string-2.ada
Normal file
3
Task/Copy-a-string/Ada/copy-a-string-2.ada
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Src : String := "Rosetta Stone";
|
||||
Dest : String := Src(1..7); -- Assigns "Rosetta" to Dest
|
||||
Dest2 : String := Src(9..13); -- Assigns "Stone" to Dest2
|
||||
6
Task/Copy-a-string/Ada/copy-a-string-3.ada
Normal file
6
Task/Copy-a-string/Ada/copy-a-string-3.ada
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
-- Instantiate the generic package Ada.Strings.Bounded.Generic_Bounded_Length with a maximum length of 80 characters
|
||||
package Flexible_String is new Ada.Strings.Bounded.Generic_Bounded_Length(80);
|
||||
use Flexible_String;
|
||||
|
||||
Src : Bounded_String := To_Bounded_String("Hello");
|
||||
Dest : Bounded_String := Src;
|
||||
3
Task/Copy-a-string/Ada/copy-a-string-4.ada
Normal file
3
Task/Copy-a-string/Ada/copy-a-string-4.ada
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
-- The package Ada.Strings.Unbounded contains the definition of the Unbounded_String type and all its methods
|
||||
Src : Unbounded_String := To_Unbounded_String("Hello");
|
||||
Dest : Unbounded_String := Src;
|
||||
Loading…
Add table
Add a link
Reference in a new issue