search for: simplearray

Displaying 2 results from an estimated 2 matches for "simplearray".

Did you mean: samplearray
2009 Jul 03
1
Dynamic libraries
...? Thanks, Robin Cowan Sample below: This one works fine: library Test1Lib; type pA=^integer; procedure simple(x:pA); cdecl; var i1,i2:integer; begin x^:=x^*2; end; exports simple; begin end. This one does not: library Test2Lib; type array1=array[1..5] of integer; pA=^array1; procedure simpleArray(x:pA); cdecl; var i1:integer; begin for i1:=1 to 5 do x^[i1]:=x^[i1]*2; end; exports simpleArray; begin end. Here is the wrapper I use: MySimple <- function(x) { ans <- .C("simple",as.integer(x)) # or simpleArray in the second case ans[[1]] } Here is what I get: &g...
2009 Jul 15
0
Fwd: DLLs
...> > procedure simple(x:pA); cdecl; > var i1,i2:integer; > > begin > x^:=x^*2; > end; > > exports simple; > begin > end. > > > This one does not: > > library Test2Lib; > > type > array1=array[1..5] of integer; > pA=^array1; > procedure simpleArray(x:pA); cdecl; > var i1:integer; > > begin > for i1:=1 to 5 do > x^[i1]:=x^[i1]*2; > end; > > exports simpleArray; > begin > end. > > > Here is the wrapper I use: > MySimple <- function(x) > { > ans <- .C("simple",as.integer(x)) # o...