|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Is there a simple way to add two similar arrays, so that each element of the new
array is the sum of the corresponding elements in the two input arrays?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 21.01.2014 12:21, schrieb John Greenwood:
> Is there a simple way to add two similar arrays, so that each element of the new
> array is the sum of the corresponding elements in the two input arrays?
You mean, simpler than to #declare a new array of same size, and in a
#for loop add all the corresponding entries?
Nope.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 21.01.2014 12:21, schrieb John Greenwood:
> > Is there a simple way to add two similar arrays, so that each element of the new
> > array is the sum of the corresponding elements in the two input arrays?
>
> You mean, simpler than to #declare a new array of same size, and in a
> #for loop add all the corresponding entries?
>
> Nope.
Pity!
Thanks for quick reply.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"John Greenwood" <nomail@nomail> wrote:
>
> Pity!
I don't think so. In a special situation this task needs three lines of code. I
think this is a reasonable burden.
But if you will write a macro to do this simple job, you must distinguish
between local and global arrays as output. You must distinguish between the
different types of possible entries to your array. For some reasons you must add
a semicolon with certain types at the end of a #declare-statement but not with
others. I for myself have no idea how to code this with the SDL.
Best regards,
Michael
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |