home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 July
/
Chip_2004-07_cd1.bin
/
tema
/
aos
/
files
/
Oberon.exe
/
Oberon
/
Docu.exe
/
Docu
/
PhonePad.Mod
(
.txt
)
< prev
next >
Wrap
Oberon Text
|
2000-02-29
|
2KB
|
48 lines
Oberon10.Scn.Fnt
(* ETH Oberon, Copyright 2000 ETH Zuerich Institut fuer Computersysteme, ETH Zentrum, CH-8092 Zuerich.
Refer to the "General ETH Oberon System Source License" contract available at: http://www.oberon.ethz.ch/ *)
MODULE PhonePad; (** portable *) (*JG 27.7.94*)
IMPORT Objects, Texts, Gadgets, Attributes, Links;
VAR W: Texts.Writer;
PROCEDURE Search*;
log: Objects.Object; T: Texts.Text;
Name, FName, Business, Street, City, PhoneNo: ARRAY 64 OF CHAR;
BEGIN
Attributes.GetString(Gadgets.FindObj(Gadgets.context, "Name"), "Value", Name);
Attributes.GetString(Gadgets.FindObj(Gadgets.context, "FName"), "Value", FName);
Attributes.GetString(Gadgets.FindObj(Gadgets.context, "Business"), "Value", Business);
Attributes.GetString(Gadgets.FindObj(Gadgets.context, "Street"), "Value", Street);
Attributes.GetString(Gadgets.FindObj(Gadgets.context, "City"), "Value", City);
Attributes.GetString(Gadgets.FindObj(Gadgets.context, "PhoneNo"), "Value", PhoneNo);
Links.GetLink(Gadgets.FindObj(Gadgets.context, "Log"), "Model", log);
T := log(Texts.Text);
IF PhoneNo[0] # 0X THEN
Texts.WriteString(W, "T-Query ");
Texts.WriteString(W, PhoneNo)
ELSIF Name[0] # 0X THEN
IF FName[0] # 0X THEN
Texts.WriteString(W, "NFC-Query ");
Texts.WriteString(W, Name); Texts.Write(W, " ");
Texts.WriteString(W, FName); Texts.Write(W, " ");
Texts.WriteString(W, City)
ELSE
Texts.WriteString(W, "NC-Query ");
Texts.WriteString(W, Name); Texts.Write(W, " ");
Texts.WriteString(W, City)
END
ELSIF Street[0] # 0X THEN
Texts.WriteString(W, "SC-Query ");
Texts.WriteString(W, Street); Texts.Write(W, " ");
Texts.WriteString(W, City)
ELSIF Business[0] # 0X THEN
Texts.WriteString(W, "BC-Query ");
Texts.WriteString(W, Business); Texts.Write(W, " ");
Texts.WriteString(W, City)
ELSE Texts.WriteString(W, "incomplete")
END;
Texts.WriteLn(W);
Texts.Append(T, W.buf)
END Search;
BEGIN Texts.OpenWriter(W)
END PhonePad.