|
boldt@ca.ibm.com wrote: >Others have submitted entries that actually directly list >the source code, but I consider that cheating and not >within the spirit of the challenge. Here's a REXX program >that fits the bill and doesn't read source from any outside >files (or take advantage of the REXX SOURCELINE cheat): > >/**/q='7f'x;b=';say a
??q??a??q??b';a="/**/q='7f'x;b=';say >a??q??a??q??b';a=";say a??q??a??q??b > >(Make sure the above fits in one source record.) > >It is a long-standing programming challenge that can be >used to compare the expressive power of various >programming languages. As far as I can tell, the shortest >RPG program that does this without reading any input >files is 29 records long. Hans, That's brilliant. I can't compete with that. Hell, I can't even read it. :-) Unfortunately you were the only one clever/academic enough to grasp the true spirit of the challenge, including the task setter. :-) As for the RPG only version (without reading input files) I can beat your 29 records by 6. FQSYSPRT O F 80 PRINTER E @LN 1 12 80 C MOVEL'**' @LN,12 C DO 2 C DO 12 IX 30 C EXCPT C ENDDO C MOVE *BLANK @LN,12 LR C ENDDO OQSYSPRT E O @LN,IX 80 ** FQSYSPRT O F 80 PRINTER E @LN 1 12 80 C MOVEL'**' @LN,12 C DO 2 C DO 12 IX 30 C EXCPT C ENDDO C MOVE *BLANK @LN,12 LR C ENDDO OQSYSPRT E O @LN,IX 80 Any advances? Dave Kahn, ABB Steward Ltd.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.