home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_09
/
1109092a
< prev
next >
Wrap
Text File
|
1993-07-08
|
845b
|
37 lines
void add(int count, float *a, float *b, float *result)
{ /* fortran */
int i;
for(i=0;i<count;++i)
result[i] = a[i] +b[i];
}
void add(int count, float *a, float *b, float *result)
{ /* UDI */
while(count--)
*result++ = *a++ + *b++;
}
void add(int count, float *a, float *b, float *result)
{ /* Csound */
do
{
*result++ = *a++ + *b++;
}while(--count);
}
void add(int count, float *a, float *b, float *result)
{ /* Resound */
float *end = result+count;
while(result<end)
{
*result++ = *a++ + *b++;
}
}
void add(int count, float *a, float *b, float *result)
{ /* Ptolemy */
int i;
for(i=count-1;i >=0;--i)
result[i] = a[i] +b[i];
}