Copy a string: Difference between revisions
Content deleted Content added
m Changed over to headers. |
|||
Line 3: | Line 3: | ||
=={{header|Ada}}== |
=={{header|Ada}}== |
||
Ada provides three |
Ada provides three different kinds of strings. The String type is a fixed length string. The Bounded_String type is a string with variable length up to a specified maximum size. The Unbounded_String type is a variable length string with no specified maximum size. The Bounded_String type behaves a lot like C strings, while the Unbounded_String type behaves a lot like the C++ String class. |
||
===Fixed Length String Copying.=== |
===Fixed Length String Copying.=== |
||
Line 24: | Line 24: | ||
Src : Unbounded_String := To_Unbounded_String("Hello"); |
Src : Unbounded_String := To_Unbounded_String("Hello"); |
||
Dest : Unbounded_String := Src; |
Dest : Unbounded_String := Src; |
||
=={{header|ALGOL 68}}== |
|||
In ALGOL 68 strings are simply flexible length arrays of CHAR; |
|||
( |
|||
STRING src:="Hello", dest; |
|||
dest:=src |
|||
) |
|||
=={{header|BASIC}}== |
=={{header|BASIC}}== |