Rosetta Code/Find unimplemented tasks: Difference between revisions
m
→{{header|Ada}}
m (→{{header|Wren}}: Minor tidy and rerun) |
JoseAlexis (talk | contribs) m (→{{header|Ada}}) |
||
Line 13:
{{libheader|AWS}}
Parsing XML with XMLAda from Adacore
<syntaxhighlight lang="ada">with
with
with Input_Sources.Strings, Unicode, Unicode.
with Ada.Strings.Unbounded, Ada.Text_IO, Ada.Command_Line;
with Ada.Containers.Vectors;
use
use
use
use Ada.Text_IO, Ada.Command_Line;
procedure Not_Coded is
package Members_Vectors is new Ada.Containers.Vectors
use Members_Vectors;
Line 39 ⟶ 38:
N : Node;
A : Attr;
Page :
S : Messages.Status_Code;
-- Query has cmlimit value of
-- retrieve the complete list of Programming_category
Uri_Xml : constant String :=
▲ "&format=xml&cmlimit=100&cmtitle=Category:";
Cmcontinue : Unbounded_String := Null_Unbounded_String;
begin
loop
Page :=
S := AWS.Response.Status_Code (Page);
if S not
Put_Line
("Unable to retrieve data => Status Code :" & Image (S) &
raise Connection_Error;
end if;
declare
Xml : constant String := Message_Body (Page);
Line 67 ⟶ 64:
begin
Open
(Xml'Unrestricted_Access, Unicode.CES.Utf8.Utf8_Encoding,
Source);
Parse (Reader, Source);
Line 79 ⟶ 75:
A := Get_Named_Item (Attributes (N), "title");
Members_Vectors.Append
(Mbr_Vector, To_Unbounded_String (Value (A)));
end loop;
Free (List);
List := Get_Elements_By_Tag_Name (Doc, "
if Length (List) = 0 then
-- we are done
Free (List);
Free (Reader);
exit;
end if;
N :=
A := Get_Named_Item (Attributes (N), "cmcontinue");
Cmcontinue :=
Free (List);
Free (Reader);
Line 103 ⟶ 97:
Beginning, Position : Extended_Index;
begin
-- take adavantage that both lists are already sorted
Beginning := First_Index (From);
for I in First_Index (Substract) .. Last_Index (Substract) loop
Position :=
if not (Position = No_Index) then
Delete (From, Position);
Line 123 ⟶ 117:
return;
else
Put ("Language given: ");
Put_Line (Argument (1));
Get_Vector (Argument (1), Language_Members);
end if;
Line 136 ⟶ 132:
Integer'Image (Last_Index ((All_Tasks))));
end Not_Coded;</syntaxhighlight>
=={{header|ARM Assembly}}==
{{works with|as|Raspberry Pi <br> or android 32 bits with application Termux}}
|