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

« back to all changes in this revision

Viewing changes to Examples/chicken/constants/precsi.scm

  • 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
 
(declare (unit precsi))
2
 
(declare (uses example))
3
 
 
4
 
;; display prelude to csi
5
 
(display "constants\n\n")
6
 
 
7
 
(display "  A SWIG example for the CHICKEN compiler\n")
8
 
(display "  Author: Jonah Beckford, December 2002\n\n")
9
 
 
10
 
(display "C Procedures:\n")
11
 
(display "  #define    ICONST      42\n")
12
 
(display "  #define    FCONST      2.1828\n")
13
 
(display "  #define    CCONST      'x'\n")
14
 
(display "  #define    CCONST2     '\n'\n")
15
 
(display "  #define    SCONST      \"Hello World\"\n")
16
 
(display "  #define    SCONST2     \"\\\"Hello World\\\"\"\n")
17
 
(display "  /* This should work just fine */\n")
18
 
(display "  #define    EXPR        ICONST + 3*(FCONST)\n")
19
 
(display "  /* This shouldn't do anything */\n")
20
 
(display "  #define    EXTERN      extern\n")
21
 
(display "  /* Neither should this (BAR isn't defined) */\n")
22
 
(display "  #define    FOO         (ICONST + BAR)\n")
23
 
(display "  /* The following directives also produce constants.  Remember that\n")
24
 
(display "     CHICKEN is normally case-insensitive, so don't rely on differing\n")
25
 
(display "     case to differentiate variable names */\n")
26
 
(display "  %constant int iconstX = 37;\n")
27
 
(display "  %constant double fconstX = 3.14;\n")
28
 
(display "\n")
29
 
 
30
 
(display "Scheme Procedures:\n")
31
 
(display "  (example:ICONST)\n")
32
 
(display "  (example:FCONST)\n")
33
 
(display "  (example:CCONST)\n")
34
 
(display "  (example:CCONST2)\n")
35
 
(display "  (example:SCONST)\n")
36
 
(display "  (example:SCONST2)\n")
37
 
(display "  (example:EXPR)\n")
38
 
(display "  (example:EXTERN)\n")
39
 
(display "  (example:FOO)\n")
40
 
(display "  (example:iconstX)\n")
41
 
(display "  (example:fconstX)\n")
42
 
(display "\n")