Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,24 +0,0 @@
|
|||
with Ada.Text_IO;
|
||||
|
||||
procedure Nested_Functions is -- 'Nested_Functions' is the name of 'main'
|
||||
|
||||
type List is array(Natural range <>) of String(1 .. 10);
|
||||
|
||||
function Make_List(Separator: String) return List is
|
||||
Counter: Natural := 0;
|
||||
|
||||
function Make_Item(Item_Name: String) return String is
|
||||
begin
|
||||
Counter := Counter + 1; -- local in Make_List, global in Make_Item
|
||||
return(Natural'Image(Counter) & Separator & Item_Name);
|
||||
end Make_Item;
|
||||
|
||||
begin
|
||||
return (Make_Item("First "), Make_Item("Second"), Make_Item("Third "));
|
||||
end Make_List;
|
||||
|
||||
begin -- iterate through the result of Make_List
|
||||
for Item of Make_List(". ") loop
|
||||
Ada.Text_IO.Put_Line(Item);
|
||||
end loop;
|
||||
end Nested_Functions;
|
||||
|
|
@ -4,12 +4,12 @@ MakeList(separator)
|
|||
{
|
||||
var counter := 1;
|
||||
|
||||
var makeItem := (item){ var retVal := counter.toPrintable() + separator + item + newLineConstant; counter += 1; ^ retVal };
|
||||
var makeItem := (item){ var retVal := counter.toPrintable() + separator + item + NewLineConstant; counter += 1; ^ retVal };
|
||||
|
||||
^ makeItem("first") + makeItem("second") + makeItem("third")
|
||||
}
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
console.printLine(MakeList(". "))
|
||||
Console.printLine(MakeList(". "))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue