Dennis-Bendert Schramm schrieb:
> Well, I wanted to do the following:
>
> var menustring:array[0..9]of string;
>
> begin
> menustring[0]:='String A';
> menustring[1]:='String B';
> menustring[2]:='String C';
> menustring[3]:='String D';
> menustring[4]:='String E';
> menustring[5]:='String F';
er....
Are you sure it is a good idea to initialize this way?
> ...
> mvprintw(1,1,menustring[0],[]);
> mvprintw(2,1,menustring[1],[]);
> ...
You don't want a loop here?
> end.
>
> When I compile with -Sh I get an error message:
>
> Incompatible type for arg no. 2: Got "AnsiString", expected "PChar"
Of course! You have to typecast! Use PChar(MyAnsiStringHere)
The difference is that you can simply typecast AnsiString to PChar.
Wolf


|