Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #72036

Re: pure c on smartphones (and other devices)

From glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups comp.lang.c
Subject Re: pure c on smartphones (and other devices)
Date 2015-10-06 10:47 +0000
Organization Aioe.org NNTP Server
Message-ID <mv08rr$eq0$1@speranza.aioe.org> (permalink)
References (4 earlier) <3ebea455-27a2-4603-944e-9d4a4ab8ecb5@googlegroups.com> <muut01$llk$1@speranza.aioe.org> <9969dd09-93cd-493f-a359-64f954a734c0@googlegroups.com> <muv0tb$mp6$1@dont-email.me> <871td8ba0x.fsf@bsb.me.uk>

Show all headers | View raw


Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:

(snip)
>> Presumably the JVM supports these, and wouldn't be too hard for C to
>> target. Harder are unsigned values (of 8, 32 and 64 bits).
 
> But it does not support pointers.  You would either have to model C's
> address space as a giant array of bytes, or you would have to make all
> objects into arrays of length one.

Yes for scalars to look like C scalars, they have to be Java
arrays of length one.

I reasonably often use them in Java programs, for example to
put into a HashTable.

    ((int[])ht.get(key))[0]++;

-- glen

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-03 08:32 -0700
  pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-03 09:19 -0700
    Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-03 09:58 -0700
      Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-03 10:20 -0700
        Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-03 10:34 -0700
          Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-03 10:40 -0700
            Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-03 11:30 -0700
              Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-03 11:43 -0700
      Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-03 10:24 -0700
        Re: pure c on smartphones (and other devices) Johann Klammer <klammerj@NOSPAM.a1.net> - 2015-10-03 20:18 +0200
          Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-03 11:23 -0700
  Re: pure c on smartphones (and other devices) Aleksandar Kuktin <akuktin@gmail.com> - 2015-10-04 12:31 +0000
    Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-04 05:45 -0700
      Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-04 05:53 -0700
        Re: pure c on smartphones (and other devices) supercat@casperkitty.com - 2015-10-05 10:52 -0700
          Re: pure c on smartphones (and other devices) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-10-05 22:18 +0000
            Re: pure c on smartphones (and other devices) supercat@casperkitty.com - 2015-10-05 16:16 -0700
              Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-06 00:27 +0100
                Re: pure c on smartphones (and other devices) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-06 10:50 +0100
                Re: pure c on smartphones (and other devices) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-10-06 10:47 +0000
                Re: pure c on smartphones (and other devices) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-06 12:31 +0100
                Re: pure c on smartphones (and other devices) supercat@casperkitty.com - 2015-10-06 09:18 -0700
                Re: pure c on smartphones (and other devices) Rosario19 <Ros@invalid.invalid> - 2015-10-06 18:30 +0200
                Re: pure c on smartphones (and other devices) supercat@casperkitty.com - 2015-10-06 10:14 -0700
                Re: pure c on smartphones (and other devices) Waldek Hebisch <antispam@math.uni.wroc.pl> - 2015-10-09 18:32 +0000
                Re: pure c on smartphones (and other devices) supercat@casperkitty.com - 2015-10-09 13:02 -0700
              Re: pure c on smartphones (and other devices) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-10-06 03:25 +0000
      Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-04 06:27 -0700
        Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-04 06:58 -0700
    Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-04 06:01 -0700
      Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-04 15:33 +0100
        Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-04 07:58 -0700
          Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-04 08:13 -0700
        Re: pure c on smartphones (and other devices) Keith Thompson <kst-u@mib.org> - 2015-10-04 15:42 -0700
          Re: pure c on smartphones (and other devices) David Brown <david.brown@hesbynett.no> - 2015-10-05 09:03 +0200
            Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-05 11:24 +0100
              Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-05 11:27 +0100
            Re: pure c on smartphones (and other devices) Keith Thompson <kst-u@mib.org> - 2015-10-05 09:29 -0700
            Re: pure c on smartphones (and other devices) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-06 03:31 -0700
              Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-06 12:29 +0100
                Re: pure c on smartphones (and other devices) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-06 07:18 -0700
                Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-06 18:33 +0100
                Re: pure c on smartphones (and other devices) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-06 11:07 -0700
                Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-07 12:53 +0100
                Re: pure c on smartphones (and other devices) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-07 06:33 -0700
                Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-07 18:21 +0100
                Re: pure c on smartphones (and other devices) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-07 19:10 -0700
  Re: pure c on smartphones (and other devices) Ayan <selfjam@gmail.com> - 2015-10-07 13:41 -0400
    Re: pure c on smartphones (and other devices) fir <profesor.fir@gmail.com> - 2015-10-07 14:01 -0700
      Re: pure c on smartphones (and other devices) Ayan <selfjam@gmail.com> - 2015-10-07 23:09 -0400
        Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-08 02:26 -0700
        Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-08 11:01 +0100
          Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-08 03:29 -0700
            Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-08 12:19 +0100
              Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-08 05:42 -0700
                Re: pure c on smartphones (and other devices) Bartc <bc@freeuk.com> - 2015-10-08 14:41 +0100
                Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-08 06:55 -0700
                Re: pure c on smartphones (and other devices) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-08 08:53 -0700
                Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-08 09:21 -0700
                Re: pure c on smartphones (and other devices) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-08 09:46 -0700
                Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-08 10:07 -0700
                Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-11 23:58 -0700
                Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-09 04:41 -0700
              Re: pure c on smartphones (and other devices) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-08 05:59 -0700

csiph-web