resource pointer()
  type pt = ptr int
  pt foo
  pt bar
  pt baz
  pt nul
  string[20] foos
  string[20] bars
  
  write("Testing pointer-string-pointer conversions:")

  nul = null
  write("Null pointer:", nul, "; string:", string(nul),
	"; int:", int(nul), "; pt(==null==):", pt("==null=="))

  baz = new(int)

  foo = new(int)
  foos= string(foo)

  bar = pt(foos)
  bars= string(bar)

  baz = pt(foos||"X")

  write("pointer  identity:", foo == bar)
  write("string   identity:", foos == bars)
  write("pointerX identity:", foo == baz)

  write("Expect invalid conversion:")
  baz = pt("invalid")

end
