Re: calling "c" from TCL
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Mon, 6 Feb 2012 12:40:44 -0800 (PST)
On Feb 6, 10:16 am, Pablo <pablodecasti...@xxxxxxxxx> wrote:
On 6 feb, 00:47, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
On Feb 5, 9:42 pm, Pablo <pablodecasti...@xxxxxxxxx> wrote:
Hello,
To sum vectors i wrote a code like this; it is receiving 3 vectors
data1, data2, data3. The diference between data1 and data2 is returned
with Tcl_SetObjResult, but i would like modify data3, how can i modify
data3??
Let the script level do that; just return the value:
set data3 [vecsub $data1 $data2]
Unless you have strong reasons (like modifying more than one var),
there's no point in bringing to the C level the equivalent of [upvar].
-Alex
Thanks Alex, but the idea is modify more than one var, the script is
working like;
set result [vecsub $dat1 $dat2 $dat3], and i would like modify $result
(it is doing calling the procedure) and $dat3
You're not making it immediately obvious how this would modify several
variables...
Assuming you do it right (passing dat3 instead of $dat3, and
[upvar]ring it within the C function), what separate thing would the
function result hold ?
-Alex
.
- References:
- calling "c" from TCL
- From: Pablo
- Re: calling "c" from TCL
- From: Alexandre Ferrieux
- Re: calling "c" from TCL
- From: Pablo
- calling "c" from TCL
- Prev by Date: Re: how to generate XML soap message
- Next by Date: Re: how to generate XML soap message
- Previous by thread: Re: calling "c" from TCL
- Next by thread: Tcl 8.4 vs 8.5
- Index(es):
Relevant Pages
|