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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-09-01 18:35:55 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050901183555-eq59uwhq8b62e44c
Tags: 1.3.24-1ubuntu4
* Use php5-dev instead of php4-dev, to kick php4 out of main.
* Drop support for generation of pike bindings, as nothing uses it,
  and swig is the only thing keeping pike7.6 in main (Ubuntu #13796)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# file: example.tcl
2
 
 
3
 
catch { load ./example[info sharedlibextension] example}
4
 
 
5
 
set a 37
6
 
set b 42
7
 
 
8
 
# Now call our C function with a bunch of callbacks
9
 
 
10
 
puts "Trying some C callback functions"
11
 
puts "    a        = $a"
12
 
puts "    b        = $b"
13
 
puts "    ADD(a,b) = [do_op $a $b $ADD]"
14
 
puts "    SUB(a,b) = [do_op $a $b $SUB]"
15
 
puts "    MUL(a,b) = [do_op $a $b $MUL]"
16
 
 
17
 
puts "Here is what the C callback function objects look like in Tcl"
18
 
puts "    ADD      = $ADD"
19
 
puts "    SUB      = $SUB"
20
 
puts "    MUL      = $MUL"
21