From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,404527a85668e8ac,start X-Google-Attributes: gid103376,public From: Al Johnston Subject: Single statment STRING to chars_ptr... how to? Date: 2000/03/14 Message-ID: <38CE7BB6.C045C710@mindspring.com>#1/1 X-Deja-AN: 597425778 Content-Transfer-Encoding: 7bit Organization: MindSpring Enterprises X-Accept-Language: en X-Server-Date: 14 Mar 2000 17:51:46 GMT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-14T17:51:46+00:00 List-Id: I am playing around with moving data between ada's "String" and interfaces.c.strings's "chars_ptr". Is it possible to do this operation as a single statement and without allocating memory (i.e. no calls to things like new_string, new, etc).. I thought my_chars_ptr := interfaces.c.strings.to_chars_ptr( interfaces.c.to_c(my_string)'access); would work... but it will not compile. I know how to accomplishes this using multi-statments along with a call to i.c.s.new_string and i.c.s.free; that solution is not what I am looking for. anyone know how to do this? thanks,