From: Charles Richmond on
Peter Flass wrote:
> Scott Lurndal wrote:
>> "(see below)" <yaldnif.w(a)blueyonder.co.uk> writes:
>>> On 24/02/2010 20:37, in article hm6fbd68gp(a)news6.newsguy.com, "Michael
>>> Wojcik" <mwojcik(a)newsguy.com> wrote:
>>>
>>>> (see below) wrote:
>>>>> Just the usual red tape: return address, frame pointer of caller;
>>>>> and either
>>>>> a static pointer or some housekeeping for 'display' registers (if
>>>>> used) to
>>>>> access non-locals. But bear in mind that in decent languages arrays
>>>>> are
>>>>> storable values, so a value array parameter gets copied in toto,
>>>>> unlike C.
>>>> It will be in C if the array is wrapped in a struct. Letting array
>>> That is passing a struct, not an array.
>>>
>>>> parameters decay to pointers was a feature of early C that couldn't be
>>>> changed for historical reasons, but when the standardization committee
>>>> added support for struct parameters, they made them first-class.
>>>> struct (and not the misnamed "typedef") is C's mechanism for creating
>>>> new types and ADTs, so if you want a pass-by-value array in C, the
>>>> correct thing to do is to put it in a struct.
>>> Yes. Preposterous, isn't it?
>>
>> Q? Why would anyone want to pass an array by value?
>>
>
> Because you can?

In C, you can *not*... :-)

--
+----------------------------------------+
| Charles and Francis Richmond |
| |
| plano dot net at aquaporin4 dot com |
+----------------------------------------+
From: rich12345 on
On Feb 5, 10:19 am, Eric Chomko <pne.cho...(a)comcast.net> wrote:
> Has anyone created a copy machine of an old system using an FPGA?

I havent, but check out:

applelogic.org (it's down right now as far as I can tell)

http://www.mirrow.com/FPGApple/

http://mirrow.com/FPGApple/revisited.html

http://members.iinet.net.au/~msmcdoug/pace/#Status


http://www.applefritter.com/blog/12920

http://c64upgra.de/c-one/


looks like the mirrow.com links aren't working either...


From: Alex Freed on
rich12345 wrote:
>
> I havent, but check out:
>
> applelogic.org (it's down right now as far as I can tell)
>
> http://www.mirrow.com/FPGApple/
>
> http://mirrow.com/FPGApple/revisited.html
>
> looks like the mirrow.com links aren't working either...
>

It has changed to alexfreed.com
So try
http://alexfreed.com/FPGApple

and

http://alexfreed.com/FPGApple/revisited

-Alex.



--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: Ahem A Rivet's Shot on
On Fri, 26 Feb 2010 13:48:48 -0500
Michael Wojcik <mwojcik(a)newsguy.com> wrote:

> Ahem A Rivet's Shot wrote:
> >
> > No, he's saying that C doesn't really implement an array type,
> > the var[offset] syntax is just syntactic sugar for *(var + offset)
> > which is why things like 3[x] work the same as x[3] in C.
>
> That's not quite correct. C does implement an array type (or, rather,
> an array type qualifier which can be used to implement arrays of any
> object type); it's just not first-class.

This is saying the same thing as I did in different terms and with
greater detail.

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
From: Eric Chomko on
On Feb 26, 5:54 pm, Peter Flass <Peter_Fl...(a)Yahoo.com> wrote:
> Scott Lurndal wrote:
> > "(see below)" <yaldni...(a)blueyonder.co.uk> writes:
> >> On 24/02/2010 20:37, in article hm6fbd6...(a)news6.newsguy.com, "Michael
> >> Wojcik" <mwoj...(a)newsguy.com> wrote:
>
> >>> (see below) wrote:
> >>>> Just the usual red tape: return address, frame pointer of caller; and either
> >>>> a static pointer or some housekeeping for 'display' registers (if used) to
> >>>> access non-locals. But bear in mind that in decent languages arrays are
> >>>> storable values, so a value array parameter gets copied in toto, unlike C.
> >>> It will be in C if the array is wrapped in a struct. Letting array
> >> That is passing a struct, not an array.
>
> >>> parameters decay to pointers was a feature of early C that couldn't be
> >>> changed for historical reasons, but when the standardization committee
> >>> added support for struct parameters, they made them first-class.
> >>> struct (and not the misnamed "typedef") is C's mechanism for creating
> >>> new types and ADTs, so if you want a pass-by-value array in C, the
> >>> correct thing to do is to put it in a struct.
> >> Yes. Preposterous, isn't it?
>
> > Q?  Why would anyone want to pass an array by value?
>
> Because you can?

In Perl there is the 'shift' statement, which allows access to an
array by value.