This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strings and Characters in Kawa


Nigel Dolby wrote:

...
But if I try to give a Java string to a Scheme function that expects a string I get a type error.
> ...

The current implementation uses j.l.String for Scheme symbols and a Kawa type for Scheme strings. So if you are writing Java code to work with strings you need to convert them to j.l.String first. <String> (as opposed to <string>) can be used to do that:

http://www.gnu.org/software/kawa/Standard-Types.html

On the plus side Kawa string functions will accept j.l.Strings as parameters:

(let ((x :: <String> "foo")) (string-append x "bar"))

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]