search for: mysimple

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

Did you mean: mysample
2009 Jul 03
1
Dynamic libraries
...n 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: > x<-c(1,2,3,4,5) > MySimple(x) [1] 2 4 6 4 5 The University of Maastricht has changed its name and mail servers. My email address is now...
2009 Jul 15
0
Fwd: DLLs
...; > 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: > > > x<-c(1,2,3,4,5) > > MySimple(x) > [1] 2 4 6 4 5 > > > The University of Maastricht...