* openstring now uses a type in the system unit

git-svn-id: trunk@3053 -
This commit is contained in:
peter 2006-03-27 09:07:33 +00:00
parent 5d4300fd45
commit 2ee71781a7
4 changed files with 23 additions and 18 deletions

1
.gitattributes vendored
View File

@ -6760,6 +6760,7 @@ tests/webtbs/tw4778.pp svneol=native#text/plain
tests/webtbs/tw4789.pp svneol=native#text/plain
tests/webtbs/tw4809.pp svneol=native#text/plain
tests/webtbs/tw4826.pp svneol=native#text/plain
tests/webtbs/tw4881.pp svneol=native#text/plain
tests/webtbs/tw4893a.pp svneol=native#text/plain
tests/webtbs/tw4893b.pp svneol=native#text/plain
tests/webtbs/tw4893c.pp svneol=native#text/plain

View File

@ -518,26 +518,15 @@ implementation
end
else
begin
if (m_mac in aktmodeswitches) then
try_to_consume(_UNIV); {currently does nothing}
single_type(tt,false);
{ open string ? }
if (varspez in [vs_out,vs_var]) and
(
(
((token=_STRING) or (idtoken=_SHORTSTRING)) and
(cs_openstring in aktmoduleswitches) and
not(cs_ansistrings in aktlocalswitches)
) or
(idtoken=_OPENSTRING)) then
begin
consume(token);
tt:=openshortstringtype;
end
else
begin
{ everything else }
if (m_mac in aktmodeswitches) then
try_to_consume(_UNIV); {currently does nothing}
single_type(tt,false);
end;
(cs_openstring in aktmoduleswitches) and
is_shortstring(tt.def) then
tt:=openshortstringtype;
if (target_info.system in [system_powerpc_morphos,system_m68k_amiga]) then
begin

View File

@ -240,6 +240,7 @@ implementation
{$endif support_longstring}
addtype('AnsiString',cansistringtype);
addtype('WideString',cwidestringtype);
addtype('OpenString',openshortstringtype);
addtype('Boolean',booltype);
addtype('ByteBool',booltype);
adddef('WordBool',torddef.create(bool16bit,0,1));

14
tests/webtbs/tw4881.pp Normal file
View File

@ -0,0 +1,14 @@
{ Source provided for Free Pascal Bug Report 4881 }
{ Submitted by "Jasper Neumann" on 2006-03-07 }
{ e-mail: _-jane-_@web.de }
type
openstring=integer;
procedure test(var x:openstring);
begin end;
var
x: openstring;
begin
test(x);
end.