comp.lang.ada
 help / color / mirror / Atom feed
From: Al Johnston <sofeise@mindspring.com>
Subject: Single statment STRING to chars_ptr... how to?
Date: 2000/03/14
Date: 2000-03-14T17:51:46+00:00	[thread overview]
Message-ID: <38CE7BB6.C045C710@mindspring.com> (raw)

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,





             reply	other threads:[~2000-03-14  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-14  0:00 Al Johnston [this message]
2000-03-15  0:00 ` Single statment STRING to chars_ptr... how to? Ted Dennison
2000-03-15  0:00   ` Al Johnston
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox