Hello Peter,

To use the work user_data pointer, I prefer a direct access as it is
simpler to use with a specific struct.

The scopes are good examples with huge specific struct [1], access [2]
and storage into work [3] are really readable without macros.

For double work array it might not be necessary to define a specific
struct but defining it will probably help code readability.

[1]:
http://cgit.scilab.org/cgit.cgi/scilab/tree/scilab/modules/scicos_blocks/src/c/cscope.c#n51
[2]:
http://cgit.scilab.org/cgit.cgi/scilab/tree/scilab/modules/scicos_blocks/src/c/cscope.c#n277
[3]:
http://cgit.scilab.org/cgit.cgi/scilab/tree/scilab/modules/scicos_blocks/src/c/cscope.c#n352

On Thu, 2013-02-21 at 00:00 -0800, pepe wrote:
> Hello,
> 
> Thank you very much for your answer! I have a similar question for 
> 
> #define W        ((SCSREAL_COP *)(GetWorkPtrs(blk))
> 
>       case Initialization:
>               GetWorkPtrs(blk) = (double *)scicos_malloc(sizeof(double)*2);
>               W[0] = 0; 
>                 W[1] = 0; 
>       break;
> 
> I need to use work array and I need to rad it out somehow since now I have
> no success.
> If you can help I would very appreciate.
> 
> Thank you
> 
> Best regards,
> Peter
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://mailinglists.scilab.org/Generic-block3-tp4025973p4025986.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
> Nabble.com.
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.scilab.org/mailman/listinfo/users

-- 
Clément DAVID
Development Engineer / Account Manager
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Mobile: +33.6.26.26.51.90
Phone: +33.2.90.22.78.96
http://www.scilab-enterprises.com

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to