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: How use formatted output in `print` method?


Yaroslav Kavenchuk wrote:
In declaration
(define-simple-class <my-class> (<java.lang.Object> <gnu.text.Printable>)
...
((print out :: <gnu.lists.Consumer>) :: #!void
...))

this statements

(out:write (format #f ...))
and
(out:write (String (format #f ...)))

generate warnings.

How do it?

It would be helpful if you have a question you include the actual error messages, and also a small complete program we can run.

In this case, my guess is you might want:

(out:write (as <String> (format #f ...))))

It looks like a minor bug in Kawa - format in this case
returns an FString, but should perhaps return a java.lang.String,
now that Kawa has been changed to use the latter for non-modifyable
String.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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