class interface PERLISH_FORMAT creation make (h, b, t: FUNCTION[ANY,TUPLE,ARRAY[STRING]]) -- create a perlish format object with up to three -- agents. The agent "b" (body) must be present. The -- other two, "h" (heading) and "t" (tail or footer) -- are optional. -- When called, the agent is expected to provide a list -- of picture strings with parameter fields and strings -- containing values that go into those fields. -- Sets the default page size to 60 lines. require has_body: b /= Void feature(s) from PERLISH_FORMAT make (h, b, t: FUNCTION[ANY,TUPLE,ARRAY[STRING]]) -- create a perlish format object with up to three -- agents. The agent "b" (body) must be present. The -- other two, "h" (heading) and "t" (tail or footer) -- are optional. -- When called, the agent is expected to provide a list -- of picture strings with parameter fields and strings -- containing values that go into those fields. -- Sets the default page size to 60 lines. require has_body: b /= Void feature(s) from PERLISH_FORMAT write -- Apply the agents we received on creation and -- write out their results to std_output require is_valid feature(s) from PERLISH_FORMAT apply -- Apply the agents we received on creation and -- write out their results to std_output require is_valid prefix "#$%%": INTEGER -- Returns the page number. -- Example: -- format : PERLISH_FORMAT -- ... -- print ( "page:" + #$%% format + "%N") prefix "#$%%++" -- Increment the page number -- I'm surprised that I don't get compilation errors page_number: INTEGER set_page_length (new_size: INTEGER) require legal_size: new_size > 0 and new_size <= 1000 inc_page_number is_valid: BOOLEAN -- verify that we have a body agent for printing end of PERLISH_FORMAT