Re: [fpc-pascal] {$modeswitch unicodestring}

2016-05-11 Thread Graeme Geldenhuys
On 2016-05-11 10:06, Jonas Maebe wrote:
> Indeed, just like any other {$mode xxx} and {$modeswitch xxx}  
> directive.

Thank you. That’s what I thought. I just wanted to double check.

Regards,
  Graeme

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] {$modeswitch unicodestring}

2016-05-11 Thread Jonas Maebe


Graeme Geldenhuys wrote on Wed, 11 May 2016:


On 2016-05-11 09:58, Jonas Maebe wrote:

It does not avoid "the issues". All that modeswitch does is make
"String" an alias for "Unicodestring" in the declaring module.


Am I correct in understanding that it only affects individual units. So
using it in my application, it would not affect the meaning of String in
the RTL for instance (String in the RTL still means
AnsiString() )?


Indeed, just like any other {$mode xxx} and {$modeswitch xxx}  
directive. I don't think we have any directive or switch that can  
cross compilation unit boundaries.


Technically, it would also be very hard to make e.g. {$modeswitch  
unicodestring} affect other units that you use. After all, the source  
code for those other units may not be available, and they would have  
to be recompiled if the meaning of "string" changed in their source  
code.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] {$modeswitch unicodestring}

2016-05-11 Thread Graeme Geldenhuys
On 2016-05-11 09:58, Jonas Maebe wrote:
> It does not avoid "the issues". All that modeswitch does is make  
> "String" an alias for "Unicodestring" in the declaring module.

Am I correct in understanding that it only affects individual units. So
using it in my application, it would not affect the meaning of String in
the RTL for instance (String in the RTL still means
AnsiString() )?

Regards,
  Graeme

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal