/tags/ttn-post-libtool-1-4-3-upgrade/SWIG/Examples/ruby/simple/runme.rb
Ruby | 21 lines | 8 code | 7 blank | 6 comment | 0 complexity | 6cc9e94ba7059b47471b21e5ff071f15 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- # file: run.rb
- require 'example'
- # Call our gcd() function
- x = 42
- y = 105
- g = Example.gcd(x,y)
- printf "The gcd of %d and %d is %d\n",x,y,g
- # Manipulate the Foo global variable
- # Output its current value
- print "Foo = ", Example.Foo, "\n"
- # Change its value
- Example.Foo = 3.1415926
- # See if the change took effect
- print "Foo = ", Example.Foo, "\n"