git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9175 626c5289-ae23-0410-ae9c-e8d60b6d4f22
24 lines
340 B
R
24 lines
340 B
R
# file: runme.R
|
|
|
|
dyn.load('example_wrap.so')
|
|
source('example_wrap.R')
|
|
cacheMetaData(1)
|
|
|
|
# Call our gcd() function
|
|
|
|
x <- 42
|
|
y <- 105
|
|
g <- gcd(x,y)
|
|
sprintf("The gcd of %d and %d is %d", x, y, g)
|
|
|
|
# Manipulate the Foo global variable
|
|
|
|
# Output its current value
|
|
Foo()
|
|
|
|
# Change its value
|
|
Foo(3.1415926)
|
|
|
|
# See if the change took effect
|
|
Foo()
|
|
|