class MemoryBank
  '
  string buf
  '
  method store(string key,text)
    buf += chr(1) + key + chr(2) + text + chr(3) + chr(13)

  end method
  '
  method find(string key) as string
    int a,b,c
    a=instr 1,buf,chr(1) + key '+ chr(2)
    if a then
      b=instr a, buf, chr(2)
      c=instr a, buf, chr(3)
      return mid buf, b+1, c-b-1
    end if
    return "( "+key+ " not found )"
  end method
  '
  method clear()
    buf=""
  end method
  '
end class

MemoryBank b
b.store "shoes","500 pairs"
b.store "ships","10 galleons"
b.store "sealing wax","5 lbs"

string f=b.find("ships")
print f
