001: PROMPT ""
002: 10 PRINT STR("-",79)
003: PRINT "'O'conv or 'I'conv ":;INPUT OI
004: IF OI="" THEN STOP
005: IF OI#"O" AND OI#"I" THEN GO 10
006: IF OI="O" THEN ELB="OCONV"
007: IF OI="I" THEN ELB="ICONV"
008: 20 PRINT STR("-",79)
009: PRINT "enter conversion ":;INPUT CONV
010: IF CONV="" THEN GO 10
011: 30 PRINT STR("-",79)
012: PRINT "enter data to test ":;INPUT X
013: IF X="" THEN GO 20
014: PRINT ELB:'(':X:',"':CONV:'") --> ':
015: IF OI="O" THEN
016: PRINT OCONV(X,CONV)
017: END ELSE
018: PRINT ICONV(X,CONV)
019: END
020: GO 30
021: END
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 22, 2004 1:45 PM
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
> Date: Fri, 22 Oct 2004 09:12:12 -0400
> From: "Mark Johnson" <[EMAIL PROTECTED]>
>
> I still maintain my opinion of most of these "stupid' test programs
because
> many of them look like this:
>
> 001 PROMPT '"
> 002 INPUT ANS
> 003 PRINT OCONV(ANS,"MD2,$Z")
> 004 END
> and another one looks like this
> 001 PROMPT ""
> 002 INPUT ANS
> 003 PRINT OCONV(ANS,"DMA")
> 004 END
So...create more intelligent test programs -- Data driven software is a
wonderful thing! I wrote this one (OCONV.TEST) to do just the sort of
things you've noted above:
001 PROMPT ""
002 LOOP
003 PRINT "Test Format: ":
004 INPUT TEST.FORMAT
005 WHILE TEST.FORMAT # "" DO
006 LOOP
007 PRINT "Input Value: ":
008 INPUT TEST.VAL
009 WHILE TEST.VAL # "" DO
010 PRINT "Converted: *":OCONV(TEST.VAL,TEST.FORMAT):"*"
011 REPEAT
012 REPEAT
013 END
I agree with others who have suggested setting up a separate file for
testing...I often wish I had done so :-> Someday, in my copious free time,
I'll clean up my old program file...
--Tom Pellitieri
Century Equipment
Toledo, Ohio
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
______________________________________________________________________
This e-mail has been scanned by MCI Managed Email Content Service, using
Skeptic(tm) technology powered by MessageLabs. For more information on MCI's
Managed Email Content Service, visit http://www.mci.com.
______________________________________________________________________
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/