SKy Scripter
2007-10-02 13:45:10
So you want to declare types in functions and procedures eh?
Well, i thought i would share this… you can declare types in functions and procedures :D
also you can do double layers
Well, i thought i would share this… you can declare types in functions and procedures :D
function TestString(i : Integer) : string;
var
S : record
ss : string;
number : Integer;
end;
State : (True, False, Maybe);
begin
with s do
case i of
1 : begin
s.ss := 'number 1';
s.number := 2;
state := True;
end;
2 : begin
s.ss := 'number 2';
s.number := 4;
State := maybe;
end;
end;
if (state = state) then
result := s.ss;
end;also you can do double layers
type
TSss = record
s : record
v, ss : string;
end;
l : Integer;
end;