SELECT cmd
FROM
wpc =>
IF button = red
THEN
{
i: INT = GetLongSelectionValue[handle];
IF ~(i
IN [0..
CARDINAL.
LAST/2])
THEN
RESOut.Complain[h: handle, msg: "not a valid wpc"];
ViewerTools.SetContents [
handle.cmd.bpcVal,
Convert.RopeFromInt[from: 2*i, base: 8, showRadix: TRUE]]};
gfi =>
IF button = red
THEN
{
i: INT = GetLongSelectionValue[handle];
IF ~(i
IN [1..PrincOps.GFTIndex.
LAST])
THEN
RESOut.Complain[h: handle, msg: "not a valid gfi"];
TRUSTED {
gfti: PrincOps.GFTItem ← PrincOps.GFT[i];
gfti.epbias ← 0;
ViewerTools.SetContents [
handle.cmd.gfVal,
Convert.RopeFromInt[from: LOOPHOLE[gfti, CARDINAL], base: 8, showRadix: TRUE]]}};
pd => {PutAsProcDesc[handle, GetSelectionValue[handle]]};
find => {
found: BOOLEAN ← FALSE;
found ← Search[handle ! RESOut.cancelAction => CONTINUE];
IF found
OR handle.autoNext^
THEN {
handle.bytesShown ← handle.bytesSeen; DoNext[handle]}};
code => {
PutAsCode[handle ! RESOut.cancelAction => CONTINUE];
IF handle.autoNext^ THEN DoNext[handle]};
octal => {
PutAsOctal[handle ! RESOut.cancelAction => CONTINUE];
IF handle.autoNext^ THEN DoNext[handle]};
bytes => {
PutAsBytes[handle ! RESOut.cancelAction => CONTINUE];
IF handle.autoNext^ THEN DoNext[handle]};
ascii => {
PutAsAscii[handle ! RESOut.cancelAction => CONTINUE];
IF handle.autoNext^ THEN DoNext[handle]};
findEp => FindEP[handle, GetSelectionValue[handle]];
goLf => GoToLf[handle, GetSelectionValue[handle]];
dspLf => DspLf[handle, GetSelectionValue[handle]];
numMop => MopToRope[handle, GetSelectionValue[handle]];
mopNum => RopeToMop[handle, ViewerTools.GetSelectionContents[]];
prefix => DisplayPrefix[handle];
next => DoNext[handle];
back => BackupPc[handle];
link => PutLink[handle, GetSelectionValue[handle]];
evi => PutEntryItem[handle, GetSelectionValue[handle]];
ENDCASE;