Spinroot

A forum for Spin users

You are not logged in.

#1 2012-10-06 11:38:38

MuhammadIsmail
Member
From: Pakistan
Registered: 2012-05-22
Posts: 23

Information and syntax request

Can anyone please tell me about how to send arrays using send/receive in spin. Is this possible.

Offline

#2 2012-10-06 11:40:49

MuhammadIsmail
Member
From: Pakistan
Registered: 2012-05-22
Posts: 23

Re: Information and syntax request

Another thing I want to know whether is there any function of finding maximum of different values in spin instead of writing it ourself.

Offline

#3 2012-10-07 00:46:11

spinroot
forum
Registered: 2010-11-18
Posts: 694
Website

Re: Information and syntax request

You can send a structure (a typedef) through a channel, with all it's field expanded, but not an array.
An easy way around that is to make the array global, so that you don't have to send it...

Offline

#4 2012-10-07 00:47:15

spinroot
forum
Registered: 2010-11-18
Posts: 694
Website

Re: Information and syntax request

There's no predefined way to take the maximum of a set of values. Easy enough to define it in a d_step though.

Offline

Board footer

Powered by FluxBB