~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Examples/tcl/multimap/example.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Landschoff
  • Date: 2002-03-29 01:56:07 UTC
  • Revision ID: james.westby@ubuntu.com-20020329015607-c0wt03xu8oy9ioj7
Tags: upstream-1.3.11
ImportĀ upstreamĀ versionĀ 1.3.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# file: example.tcl
 
2
# Try to load as a dynamic module.
 
3
 
 
4
catch { load ./example.so example}
 
5
catch { load ./example.dll example}    ;# Windows
 
6
 
 
7
# Call our gcd() function
 
8
set x 42
 
9
set y 105
 
10
set g [gcd $x $y]
 
11
puts "The gcd of $x and $y is $g"
 
12
 
 
13
# call the gcdmain
 
14
gcdmain "gcdmain 42 105"
 
15
 
 
16
 
 
17
# call count
 
18
set c [count "Hello World" l]
 
19
puts $c
 
20
 
 
21
# call capitalize
 
22
 
 
23
set c [capitalize "helloworld"]
 
24
puts $c
 
25