FOR portIndex:
CARDINAL
IN [0 .. length)
DO
job: Job ←
NEW [JobRep ← [
exec: NIL,
rootName: NIL,
from: NIL,
log: viewerLog,
type: Other]];
any: REF ANY;
bits: [0 .. 16);
typeAsRope: ROPE;
ports[portIndex].firstWord ← stream.GetCard[];
ports[portIndex].wordCount ← stream.GetCard[];
ports[portIndex].name ← stream.GetRopeLiteral[];
typeAsRope ← stream.GetRopeLiteral[];
job.from ← IO.RIS[typeAsRope];
any ← ParseExpression[job];
WITH any
SELECT
FROM
sti: SignalTypeInvocation => ports[portIndex].type ← sti.st;
id: ID => {sti: SignalTypeInvocation ← InstantiateSignalType[job, id.rope, NIL]; ports[portIndex].type ← sti.st};
ENDCASE => ERROR;
bits ← stream.GetCard[];
ports[portIndex].input ← (bits MOD 2) >= 1;
ports[portIndex].output ← (bits MOD 4) >= 2;
ports[portIndex].XPhobic ← (bits MOD 8) >= 4;
ports[portIndex].special ← (bits MOD 16) >= 8;
ports[portIndex].other ← AssertingIO.Read[stream];
ENDLOOP;