[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to translate this to gm2?
From: |
Gaius Mulley |
Subject: |
Re: How to translate this to gm2? |
Date: |
Tue, 24 Mar 2020 18:38:33 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Hưng Hưng <address@hidden> writes:
> typedef *unsigned char pchar;
> typedef *pchar ppchar;
> typedef *ppchar pppchar;
>
> if I define pchar as array as char the compiler always complain about
> syntax error.
>
> Finally, what I wanted to know is how to interop with C string! Please
> help. It's too little document :(
Hi,
sure:
> typedef *unsigned char pchar;
TYPE
pchar = POINTER TO CHAR ;
or
pchar = POINTER TO CARDINAL8 ;
and then probably wrap data into calls to DynamicString or FormatStrings
via casts to ADDRESS and InitStringCharStar and use -funsigned-char on
the commmand line (I think)
> typedef *pchar ppchar;
ppchar = POINTER TO pchar ;
> typedef *ppchar pppchar;
pppchar = POINTER TO ppchar ;
(although it maybe you want to use)
PROCEDURE foo (VAR a: ppchar) ;
depending on the specification of foo,
regards,
Gaius