fpc/tests/test/jvm/outpara.pp
Jonas Maebe 28c20cfc5e * the default string type for the JVM target is no longer automatically
unicodestring = java.lang.String. The reason this was the default in
    the past is that this was the first string type that was implemented,
    and without it being the default most code involving string operations
    would fail. Now the default strings types are the same as for other
    targets
  + new {$modeswitch unicodestrings} directive, that when activated
    *together* with {$h+},
   1) changes char into an alias for widechar
   2) changes string into an alias for unicodestring
   3) changes the preferred string evaluation type (in case of uncertainty)
      to unicodestring
    {$modeswitch unicodestrings} with {$h-} does not change anything at all
    regarding the string type (it still changes the char type)
  + new uuchar unit that redefines char as widechar, and which is automatically
    included by the compiler if {$modeswitch unicodestrings} is enabled

git-svn-id: branches/jvmbackend@18781 -
2011-08-20 08:35:47 +00:00

29 lines
355 B
ObjectPascal

{$mode objfpc}
{$modeswitch unicodestrings}
unit outpara;
interface
procedure test(out l: string);
procedure main(args: array of string);
implementation
procedure test(out l: string);
begin
l:='abc';
end;
procedure main(args: array of string);
var
x: string;
begin
test(x);
if x<>'abc' then
raise jlexception.Create('wrong')
end;
end.