code: 9ferno

ref: 44ce0097b612a1fefd754065bdf8d9d2e5ef60c8
dir: /appl/examples/minitel/event.b/

View raw version
#
# Copyright © 1998 Vita Nuova Limited.  All rights reserved.
#

Event.str(ev: self ref Event) : string
{
	s := "?";
	pick e := ev {
		Edata =>
			s = sprint("Edata %d = ", len e.data);
			for(i:=0; i<len e.data; i++)
				s += hex(int e.data[i], 2) + " ";
		Equit =>
			s = "Equit";
		Eproto =>
			s = sprint("Eproto %ux (%s)", e.cmd, e.s);
	}
	return s;
}