diff --git a/compiler/ninl.pas b/compiler/ninl.pas index 3f732b6b3a..2e1c91cf8f 100644 --- a/compiler/ninl.pas +++ b/compiler/ninl.pas @@ -507,6 +507,11 @@ implementation else begin name := procprefixes[do_read]+'boolean'; + + { iso pascal needs a different handler } + if (m_iso in current_settings.modeswitches) and not(do_read) then + name:=name+'_iso'; + readfunctype:=booltype; end else @@ -778,7 +783,6 @@ implementation para,nextpara:Tcallparanode; p1:Tnode; temp:Ttempcreatenode; - begin found_error:=false; para:=Tcallparanode(params); diff --git a/rtl/inc/compproc.inc b/rtl/inc/compproc.inc index 1deaa00f79..b7e569c796 100644 --- a/rtl/inc/compproc.inc +++ b/rtl/inc/compproc.inc @@ -485,6 +485,7 @@ procedure fpc_write_text_enum(typinfo,ord2strindex:pointer;len:sizeint;var t:tex Procedure fpc_Write_Text_Currency(fixkomma,Len : Longint;var t : Text;c : Currency); compilerproc; {$endif FPC_HAS_STR_CURRENCY} Procedure fpc_Write_Text_Boolean(Len : Longint;var t : Text;b : Boolean); compilerproc; +Procedure fpc_Write_Text_Boolean_Iso(Len : Longint;var t : Text;b : Boolean); compilerproc; Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); compilerproc; {$ifdef FPC_HAS_FEATURE_WIDESTRINGS} Procedure fpc_Write_Text_WideChar(Len : Longint;var t : Text;c : WideChar); compilerproc; diff --git a/rtl/inc/text.inc b/rtl/inc/text.inc index bcfb2841ed..ebbe757563 100644 --- a/rtl/inc/text.inc +++ b/rtl/inc/text.inc @@ -848,6 +848,18 @@ Begin End; +Procedure fpc_Write_Text_Boolean_Iso(Len : Longint;var t : Text;b : Boolean); iocheck; compilerproc; +Begin + If (InOutRes<>0) then + exit; +{ Can't use array[boolean] because b can be >0 ! } + if b then + Write_Str(Len,t,'true') + else + Write_Str(Len,t,'false'); +End; + + Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); iocheck; compilerproc; Begin If (InOutRes<>0) then