diff options
author | Ian Lance Taylor <iant@google.com> | 2010-06-10 01:13:31 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2010-06-10 01:13:31 +0000 |
commit | 5af2978f77cad0eec048ba1ea09b07e8ad7abbfa (patch) | |
tree | 2a7c8d569dde6570e0a5baa907bb5b3084697a52 /Examples/go/constants/runme.go | |
parent | 09f14197ac1df83e9b428d84782238abec0500bd (diff) | |
download | swig-5af2978f77cad0eec048ba1ea09b07e8ad7abbfa.tar.gz |
Add support for the Go programming language.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12108 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/go/constants/runme.go')
-rw-r--r-- | Examples/go/constants/runme.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Examples/go/constants/runme.go b/Examples/go/constants/runme.go new file mode 100644 index 000000000..78a047e20 --- /dev/null +++ b/Examples/go/constants/runme.go @@ -0,0 +1,18 @@ +package main + +import ( + "fmt" + "./example" +) + +func main() { + fmt.Println("ICONST = ", example.ICONST, " (should be 42)") + fmt.Println("FCONST = ", example.FCONST, " (should be 2.1828)") + fmt.Printf("CCONST = %c (should be 'x')\n", example.CCONST) + fmt.Printf("CCONST2 = %c(this should be on a new line)\n", example.CCONST2) + fmt.Println("SCONST = ", example.SCONST, " (should be 'Hello World')") + fmt.Println("SCONST2 = ", example.SCONST2, " (should be '\"Hello World\"')") + fmt.Println("EXPR = ", example.EXPR, " (should be 48.5484)") + fmt.Println("iconst = ", example.Iconst, " (should be 37)") + fmt.Println("fconst = ", example.Fconst, " (should be 3.14)") +} |