Add multilingual Agila learning examples and Git practice guide
This commit is contained in:
commit
85f487afb0
79 files changed
+813
No files matched your search
@@ -0,0 +1,9 @@
|
||||
# Bahin sa pag-uswag nga imong mapamatud-an
|
||||
|
||||
Palapda ang bahin sa level pinaagi sa imong kaugalingong operasyon nga adunay klarong specification. Isumite ang ebidensiya sa malampuson ug gipaabot nga mapakyas nga mga kaso uban sa mapasabot nga pagrepaso.
|
||||
|
||||
- Itala ang gitugot nga input ug gisaad nga resulta.
|
||||
- Ipadayon nga aktibo ang assertion checking ug itala ang compiler settings.
|
||||
- Sulayi ang ubos ug taas nga balidong input ug lahi nga paglapas sa precondition.
|
||||
- Ipakita nga masakpan ang tinuyong sayop nga body, unya ibalik ang husto.
|
||||
- Ipasabot ang nahibiling limitasyon ug ilha ang sunod nga lakang sa pagtuon.
|
||||
@@ -0,0 +1,18 @@
|
||||
pragma Assertion_Policy (Check);
|
||||
with Ada.Text_IO;
|
||||
|
||||
procedure Main is
|
||||
subtype Level is Integer range 0 .. 10;
|
||||
function Next_Level (Current : Level) return Level
|
||||
with Pre => Current < Level'Last,
|
||||
Post => Next_Level'Result = Current + 1;
|
||||
|
||||
function Next_Level (Current : Level) return Level is
|
||||
begin
|
||||
return Current + 1;
|
||||
end Next_Level;
|
||||
begin
|
||||
pragma Assert (Next_Level (0) = 1);
|
||||
pragma Assert (Next_Level (9) = 10);
|
||||
Ada.Text_IO.Put_Line ("Nakapasar ang duha ka pagsusi sa utlanan");
|
||||
end Main;
|
||||
Reference in new issue
Block a user