home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / pub / users / Harry / Blitz / OSProject / p1 / HelloWorld.c < prev    next >
Text File  |  2007-09-19  |  391b  |  25 lines

  1. code Hello
  2.  
  3.   -- This is the "hello world" program, for use in Project 1.
  4.  
  5.   function main ()
  6.       print ("Hello, world...\n")
  7.       --foo (10)
  8.     endFunction
  9.  
  10.   function foo (x: int)
  11.       bar (x+1)
  12.     endFunction
  13.  
  14.   function bar (a: int)
  15.     var b: int
  16.       b = a + 1
  17.       print ("The value of b is ")
  18.       printInt (b)
  19.       nl ()
  20.       debug
  21.       bar (b)
  22.     endFunction
  23.  
  24. endCode
  25.