+ introduce iso mode

git-svn-id: trunk@15677 -
This commit is contained in:
florian 2010-07-31 20:38:42 +00:00
parent 443b4ad8dc
commit ced4f95c56
3 changed files with 10 additions and 5 deletions

View File

@ -69,6 +69,8 @@ interface
{$endif} {$endif}
macmodeswitches = macmodeswitches =
[m_mac,m_all,m_result,m_cvar_support,m_mac_procvar]; [m_mac,m_all,m_result,m_cvar_support,m_mac_procvar];
isomodeswitches =
[m_iso,m_all,m_tp_procvar,m_duplicate_names];
{ maximum nesting of routines } { maximum nesting of routines }
maxnesting = 32; maxnesting = 32;

View File

@ -245,7 +245,7 @@ interface
{ Switches which can be changed by a mode (fpc,tp7,delphi) } { Switches which can be changed by a mode (fpc,tp7,delphi) }
tmodeswitch = (m_none,m_all, { needed for keyword } tmodeswitch = (m_none,m_all, { needed for keyword }
{ generic } { generic }
m_fpc,m_objfpc,m_delphi,m_tp7,m_mac, m_fpc,m_objfpc,m_delphi,m_tp7,m_mac,m_iso,
{$ifdef fpc_mode}m_gpc,{$endif} {$ifdef fpc_mode}m_gpc,{$endif}
{ more specific } { more specific }
m_class, { delphi class model } m_class, { delphi class model }
@ -364,7 +364,7 @@ interface
{$endif} {$endif}
modeswitchstr : array[tmodeswitch] of string[18] = ('','', modeswitchstr : array[tmodeswitch] of string[18] = ('','',
'','','','','', '','','','','','',
{$ifdef fpc_mode}'',{$endif} {$ifdef fpc_mode}'',{$endif}
{ more specific } { more specific }
'CLASS', 'CLASS',

View File

@ -346,6 +346,9 @@ implementation
else else
if s='MACPAS' then if s='MACPAS' then
current_settings.modeswitches:=macmodeswitches current_settings.modeswitches:=macmodeswitches
else
if s='ISO' then
current_settings.modeswitches:=isomodeswitches
else else
b:=false; b:=false;
@ -359,8 +362,8 @@ implementation
HandleModeSwitches(changeinit); HandleModeSwitches(changeinit);
{ turn on bitpacking for mode macpas } { turn on bitpacking for mode macpas and iso pascal }
if (m_mac in current_settings.modeswitches) then if ([m_mac,m_iso] * current_settings.modeswitches <> []) then
begin begin
include(current_settings.localswitches,cs_bitpacking); include(current_settings.localswitches,cs_bitpacking);
if changeinit then if changeinit then
@ -368,7 +371,7 @@ implementation
end; end;
{ support goto/label by default in delphi/tp7/mac modes } { support goto/label by default in delphi/tp7/mac modes }
if ([m_delphi,m_tp7,m_mac] * current_settings.modeswitches <> []) then if ([m_delphi,m_tp7,m_mac,m_iso] * current_settings.modeswitches <> []) then
begin begin
include(current_settings.moduleswitches,cs_support_goto); include(current_settings.moduleswitches,cs_support_goto);
if changeinit then if changeinit then