File: hello.js

package info (click to toggle)
ngs-js 0.2.5-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 3,800 kB
  • ctags: 2,977
  • sloc: ansic: 34,455; sh: 4,827; perl: 261; makefile: 208
file content (48 lines) | stat: -rw-r--r-- 712 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function main ()
{
  System.stdout.writeln ("main(): enter");

  System.stdout.writeln ("calling our `hello' global...");
  hello ();

  System.stdout.writeln ("calling our `Hello.show' method...");
  Hello.show ();
  try
    {
      Hello.fail ();
    }
  catch (msg)
    {
      System.stdout.writeln (msg);
    }

  System.stdout.writeln ("Hello.msg=" + Hello.msg);
  try
    {
      Hello.msg = "foo";
    }
  catch (msg)
    {
      System.stdout.writeln (msg);
    }

  var h1 = new Hello ("Hello, mtr!");
  h1.show ();

  Hello.investigate (h1);

  var h2 = h1.copy ();
  h2.show ();
  Hello.investigate (h2);

  System.stdout.writeln ("main(): leave");
}

main ();


/*
Local variables:
mode: c
End:
*/