Prev: Why can nsmc, local classes or anonymous classes have static members ?
Next: Web Services Restful Services
From: Eric Sosman on 17 Dec 2009 10:08 On 12/16/2009 8:32 PM, markspace wrote: > Arne Vajh�j wrote: >> On 16-12-2009 11:21, markspace wrote: >>> [...] >>> >>> #define SPORT_1 (*(void*)0x10001234) >>> >> Not that it is significant for your point, but I assume the first >> asterisk should not be there. > > > I think it should, although I could be wrong. The idea is to read and > write SPORT_1 as if it were a variable, without having to apply further > modifiers. > > int value = SPORT_1; > value &= 0xF; > SPORT_1 = value; > > Although I admit I may have messed up the syntax in my previous post. <off-topic> The syntax is fine; the error is in the semantics. A C compiler must issue a diagnostic message for your sample code. Follow-ups set to comp.lang.c; this isn't about Java. </off-topic> -- Eric Sosman esosman(a)ieee-dot-org.invalid
From: Martin Gregorie on 18 Dec 2009 10:55 On Fri, 18 Dec 2009 07:37:51 -0800, markspace wrote: > This is from a system I programmed on around 1990 or so, practically the > stone age. > The computing stone age was prior to 1964, when IBM's System/360 and ICL's 1900 ranges were rolled out. These two mainframe series introduced the idea of a compatible range of computers - before that programs only ran on a single CPU and about the only scalability was to change the amount of memory or the number and type of peripheral devices attached to it. Integrated circuits, microprocessors and microcomputers appeared in the mid 70s and the IBM PC in 1982 - very little thats radically new has happened since then. Unix? 1970. Networks? SNA and X.25 were early 80s tech. TCP/IP was mid 80s. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
First
|
Prev
|
Pages: 1 2 3 4 Prev: Why can nsmc, local classes or anonymous classes have static members ? Next: Web Services Restful Services |