Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,2 @@
class MY_CLASS
end

View file

@ -0,0 +1,14 @@
class MY_CLASS
create
make
feature {NONE} -- Initialization
make
-- This is a creation procedure or "Constructor".
do
create my_string.make_empty
end
end

View file

@ -0,0 +1,43 @@
class MY_CLASS
create -- Here we are declaring ...
make, -- In the Feature group (below) we are coding
make_this_way, -- each of these declared creation procedures.
make_that_way, -- We can have as many constructors as we need.
make_another_way,
a_name_other_than_make
feature {NONE} -- Initialization
make
-- This is a creation procedure or "Constructor".
do
-- Initialization code goes here ...
end
make_this_way
-- Make this way, rather than a plain ole "make".
do
-- Initialization code goes here ...
end
make_that_way
-- Create that way rather than this way (above).
do
-- Initialization code goes here ...
end
make_another_way
-- And still another way to create MY_CLASS.
do
-- Initialization code goes here ...
end
a_name_other_than_make
-- There is no requirement to use the word "make".
-- The word "make" is just a naming convention.
do
-- Initialization code goes here ...
end
end

View file

@ -0,0 +1,48 @@
class MY_CLASS
create
make
feature {NONE} -- Initialization
make
-- This is a creation procedure or "Constructor".
do
create my_string.make_empty
end
feature -- Access (Properties)
my_string: STRING
-- This is a comment about `my_string', which is a "Property".
my_integer: INTEGER
-- Unlike `my_string' (above), the INTEGER type is an "Expanded Type".
-- This means INTEGER objects know how to self-initialize.
my_date: DATE
-- This attribute (or "Property") will need to be initialized.
-- One way to do that is to make a self-initializing attribute, thus ...
attribute
create Result.make_now
end
feature -- Basic Operations (Methods)
do_something
-- Loop over and print the numbers 1 to 100 to the console.
do
across 1 |..| 100 as i loop print (i.out) end
end
do_something_else
-- Set a and b and print the result.
local
a, b, c: INTEGER
do
a := 1
b := 2
c := a + b
end
end