simple

package
v0.0.0-...-1ee9814 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package simple go call c with swig

Example
package main

import (
	"fmt"

	"github.com/Akagi201/swiggo/simple"
)

func main() {
	// Call our gcd() function
	x := 42
	y := 105
	g := simple.Gcd(x, y)
	fmt.Println("The gcd of", x, "and", y, "is", g)

	// Manipulate the Foo global variable

	// Print its current value
	fmt.Println("Foo =", simple.GetFoo())

	// Change its value
	simple.SetFoo(3.1415926)

	// See if the change took effect
	fmt.Println("Foo =", simple.GetFoo())

}
Output:
The gcd of 42 and 105 is 21
Foo = 3
Foo = 3.1415926

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL