> He was able to print one column of labels, with a
\n at the end of each
> line, and then was stuck because he couldn't make the printer go back up
> to the top of the page again!
On Mon, 6 Apr 2009, Alexandre Souza wrote:
???
Why not take three registers and print one line in three labels at
once?!?!
He wanted to
while (NOT at end of page)
{ read name
write name
read address
write address
}
GOTO top of page, second column
while (NOT at end of page)
{ read name
. . .
}
one of the simplest solutions is:
while (NOT at end-of-file)
{ read name1
read address1
read name2
read address2
read name3
read address3
write name1, name2, name3
write address1, address2, address3
}
Am I being too dumb or was your friend too dumb?
:oO
Original instructions were: "here's some label stock, address a copy
of
this mailer to everybody in this file; they're already in Zipcode order".
Environment was PC with MS-DOS and/or Linux, and a reasonable assortment
of compilers and related tools.
He was dumb enough that he couldn't figure it out in three days, even with
some hints and suggestions, so I fired him. definitely not a friend
anymore.
I realize that that task was "data processing", but I would still expect a
"computer scientist/programmer" to be able to work it out.
--
Grumpy Ol' Fred cisin at
xenosoft.com