From: Per Bothner <per@bothner.com>
To: Fabian Boucsein <Fabian.Boucsein@gmx.de>
Cc: Tom Bousso <tombousso@gmail.com>, kawa@sourceware.org
Subject: Re: Kawa JTable String[][] arrays
Date: Fri, 10 Nov 2017 16:02:00 -0000 [thread overview]
Message-ID: <97029a38-0311-9544-35e4-baa1f36ce461@bothner.com> (raw)
In-Reply-To: <trinity-04a5af7c-37c2-44e1-bbbf-f72f1f5c74ff-1510328667207@3c-app-gmx-bs65>
On 11/10/2017 07:44 AM, Fabian Boucsein wrote:
> Thank you very much Per and Tom.
>
> Per's version works very fine for me. Although i think they should be almost the same. What does ::String[][]? And maybe could you explain the difference between string and String?
'::TYPE' (or with a space as in ':: TYPE') is a "type specifier".
See https://www.gnu.org/software/kawa/Definitions.html.
(define data::String[][] [["Japan" "245"] ["USA" "240"]])
would probably be more readable as
(define data ::String[][] [["Japan" "245"] ["USA" "240"]])
(define data :: String[][] [["Japan" "245"] ["USA" "240"]])
Regardless it specifies that 'data' has the type "String[][]'.
Normally ["Japan" "245"] evaluates to an immutable vector,
but when the required type (in the static context) is a String[]
then the compiler converts it for you. Similarly for String[][]/
You can write java.lang.String[][] instead of String[][].
They're not quite the same in terms what conversions they
handle, but specify the same data type.
The '[]' means a Java array type (as opposed to the multi-dimensional Scheme arrays).
https://www.gnu.org/software/kawa/Standard-Types.html
explains 'string' versus 'String'.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
next prev parent reply other threads:[~2017-11-10 16:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 9:06 Fabian Boucsein
2017-11-09 9:11 ` Tom Bousso
2017-11-09 18:14 ` Per Bothner
2017-11-10 15:44 ` Fabian Boucsein
2017-11-10 16:02 ` Per Bothner [this message]
2017-11-09 9:35 ` Damien MATTEI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97029a38-0311-9544-35e4-baa1f36ce461@bothner.com \
--to=per@bothner.com \
--cc=Fabian.Boucsein@gmx.de \
--cc=kawa@sourceware.org \
--cc=tombousso@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).