📄 time_class.bdy
字号:
-- +------------------------------------
-- | Library: VFP
-- | Designer: Tim Pagden
-- | Opened: 28 Dec 1997
-- +------------------------------------
package body time_class is
-- time defined in std.standard
function longest ( -- 10.05.93
a, b: time
) return time is
variable y: time;
begin
if (a >= b) then
y := a;
else
y := b;
end if;
return y;
end longest;
function longest ( -- 31.05.93
a, b, c: time
) return time is
variable ab: time;
variable y: time;
begin
if (a >= b) then
ab := a;
else
ab := b;
end if;
if (ab >= c) then
y := ab;
else
y := c;
end if;
return y;
end longest;
function longest ( -- 31.05.93
a, b, c, d: time
) return time is
variable ab: time;
variable cd: time;
variable y: time;
begin
if (a >= b) then
ab := a;
else
ab := b;
end if;
if (c >= d) then
cd := c;
else
cd := d;
end if;
if (ab >= cd) then
y := ab;
else
y := cd;
end if;
return y;
end longest;
function longest ( -- 31.05.93
a, b, c, d, e: time
) return time is
variable ab: time;
variable cd: time;
variable cde: time;
variable y: time;
begin
if (a >= b) then
ab := a;
else
ab := b;
end if;
if (c >= d) then
cd := c;
else
cd := d;
end if;
if (cd >= e) then
cde := cd;
else
cde := e;
end if;
if (ab >= cde) then
y := ab;
else
y := cde;
end if;
return y;
end longest;
function longest ( -- 31.05.93
a, b, c, d, e, f: time
) return time is
variable ab: time;
variable cd: time;
variable ef: time;
variable abcd: time;
variable y: time;
begin
if (a >= b) then
ab := a;
else
ab := b;
end if;
if (c >= d) then
cd := c;
else
cd := d;
end if;
if (e >= f) then
ef := e;
else
ef := f;
end if;
if (ab >= cd) then
abcd := ab;
else
abcd := cd;
end if;
if (abcd >= ef) then
y := abcd;
else
y := ef;
end if;
return y;
end longest;
function longest ( -- 31.05.93
a, b, c, d, e, f, g: time
) return time is
variable ab: time;
variable cd: time;
variable ef: time;
variable efg: time;
variable abcd: time;
variable y: time;
begin
if (a >= b) then
ab := a;
else
ab := b;
end if;
if (c >= d) then
cd := c;
else
cd := d;
end if;
if (e >= f) then
ef := e;
else
ef := f;
end if;
if (ef >= g) then
efg := ef;
else
efg := g;
end if;
if (ab >= cd) then
abcd := ab;
else
abcd := cd;
end if;
if (abcd >= efg) then
y := abcd;
else
y := efg;
end if;
return y;
end longest;
function longest ( -- 31.05.93
a, b, c, d, e, f, g, h: time
) return time is
variable ab: time;
variable cd: time;
variable ef: time;
variable gh: time;
variable abcd: time;
variable efgh: time;
variable y: time;
begin
if (a >= b) then
ab := a;
else
ab := b;
end if;
if (c >= d) then
cd := c;
else
cd := d;
end if;
if (e >= f) then
ef := e;
else
ef := f;
end if;
if (g >= h) then
gh := g; -- g > h
else
gh := h; -- h > g
end if;
if (ab >= cd) then
abcd := ab;
else
abcd := cd;
end if;
if (ef >= gh) then
efgh := ef;
else
efgh := gh;
end if;
if (abcd >= efgh) then
y := abcd;
else
y := efgh;
end if;
return y;
end longest;
function longest ( -- 31.05.93
a, b, c, d, e, f, g, h, i: time
) return time is
variable ab: time;
variable cd: time;
variable ef: time;
variable gh: time;
variable ghi: time;
variable abcd: time;
variable efghi: time;
variable y: time;
begin
if (a >= b) then
ab := a;
else
ab := b;
end if;
if (c >= d) then
cd := c;
else
cd := d;
end if;
if (e >= f) then
ef := e;
else
ef := f;
end if;
if (g >= h) then
gh := g; -- g > h
else
gh := h; -- h > g
end if;
if (gh >= i) then
ghi := gh; -- ">"(g,h) > i
else
ghi := i; -- i > g,h
end if;
if (ab >= cd) then
abcd := ab;
else
abcd := cd;
end if;
if (ef >= ghi) then
efghi := ef;
else
efghi := ghi;
end if;
if (abcd >= efghi) then
y := abcd;
else
y := efghi;
end if;
return y;
end longest;
end time_class;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -