Skip to content

anonymous /gist:4070079

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
with Ada.text_io; use Ada.Text_io;
procedure test is
-- type declarations needed to define type Lstring -- don't worry about limited private at this stage
function toLstring (Str : in String) -- full declaration of the function body
function toString (Lstr : Lstring) -- full declaration of the function body
lstr1 : Lstring;
-- a small procedure to display the contents of an Lstring -- it assumes the type declarations shown above procedure show (lstr : Lstring) is str : str_link; begin if lstr = null then return; end if;
str := lstr.list; while str /= null loop Put(; str :=; end loop; new_line; end show;
lstr1 := toLstring("This is a test string"); show(lstr1); put_line("'" & toString(lstr1) & "'");
end test;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.