Предмет:
Тип роботи:
Курсова робота
К-сть сторінок:
82
Мова:
Українська
writeln('}');
build_list(field_list,buffer,add_only_offset(buffer,hash_ofs));
inc(indentation,2);
current := field_list;
while current^.offset < $ffff do
begin
obj := add_only_offset(buffer,current^.offset);
print_obj(obj);
current := current^.next;
end;
dec(indentation);
indent;
write('end');
dec(indentation);
last_kind := save_kind;
end;
4 : begin {File}
write('file');
if base_unit <> 0 then
begin
write(' of ');
write_var_type(base_unit,base_ofs);
end;
end;
5 : write('built-in text type');
6 : begin {function/procedure}
no_name := '';
write_proc_type(no_name,[],func_type_ptr(addr(return_ofs)));
end;
7 : begin {Set}
write('set of ');
write_var_type(base_unit,base_ofs);
end;
8 : begin {Pointer}
write('^');
write_var_type(target_unit,target_ofs);
end;
9 : begin {String}
write('string[',size-1,']');
{N.B. actually record is like array of char, but "string" with
no length is different.}
end;
10 : write('built-in ',size,' byte 8087 type'); {8087}
11 : write('built-in 6-byte real');
12,13,14 : begin {Range}
write_const_type(lower,type_unit,type_ofs,
get_buffer(def));
write('..');
write_const_type(upper,type_unit,type_ofs,
get_buffer(def));
end;
15 : begin {Enumeration or subrange}
if (type_unit = unit_list[1]^.own_record)
and (type_ofs = obj_ofs(def)) then
begin
{ Must be first definition }
write('(');
{ Assume following records are constant declarations }
for l:=lower to upper do
begin
if l<>lower then write(',');
write_enum_const(def,l);
end;
NowEnum:=def;
write(')');
end
else
begin
{ Must be subrange }
type_obj := add_only_offset(get_unit(type_unit)^.buffer,type_ofs);