That seems to be a nice compromise.
- Original Message -
From: Kieran Clulow [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, October 24, 2004 7:14 PM
Subject: RE: [U2] [UD] running a subroutine
opinion
Goto's are fine in user interface validation code if they remain within
PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
flame-on GOTO's are for the mentally challenged!!! flame-off
Have a nice day.
Will
In a message dated 10/22/2004 8:17:50 PM Pacific Daylight Time,
[EMAIL PROTECTED] writes:
Ditto: This could be replaced with my single PRINT statement.
snip
for the GOTO's. This list is
usually GOTO-phobic.
- Original Message -
From: Burwell, Edward [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 22, 2004 2:03 PM
Subject: RE: [U2] [UD] running a subroutine
001: PROMPT
002: 10 PRINT STR(-,79)
003: PRINT 'O'conv
, October 21, 2004 11:30 AM
Subject: Re: [U2] [UD] running a subroutine
However, an argument can be made for *not* eliminating those 90% of
stupid test programs. By writing small test programs that not only
pass the subroutine known input but then check the results against
predicted values
.
- Original Message -
From: Allen E. Elwood [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 21, 2004 3:43 PM
Subject: RE: [U2] [UD] running a subroutine
Mark Wrote:
Am I the only programmer with multiple environments (clients) that
continues
to follow in the footsteps
:[EMAIL PROTECTED] On Behalf Of Mark Johnson
Sent: Friday, October 22, 2004 8:23 AM
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
I could write a book on that topic. I have around 9-12 clients in MV (and 3
in MS Access) and the 'eat when you work' aspect is very true. I'm making
more
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
-
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
Again, that could be replaced with my disposable single line PRINT statement
without having to remember where you put it.
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:
, Edward [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 22, 2004 2:03 PM
Subject: RE: [U2] [UD] running a subroutine
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
Now, lets not GOTO there, shall we? ;-D
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
Sent: Friday, October 22, 2004 19:53
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
Ditto: This could be replaced with my single PRINT
I'll just add a small footnote to that one...
We version stamp every program, by insering a block that reads e.g :
ADGVERDATA=''
ADGVERDATA := 'Version=004003054;'
ADGVERDATA := 'VerDate=13394;'
ADGVERDATA := 'VerProd=MVQUERY;'
ADGVERDATA := 'VerTM=MMT mvQuery;'
ADGVERDATA := 'VerCopy=Copyright
However, an argument can be made for *not* eliminating those 90% of
stupid test programs. By writing small test programs that not only
pass the subroutine known input but then check the results against
predicted values (predictive testing), you are building a test suite of
automated unit
)
No hanging ELSE or THENs. 2) Cannot use READNEXT. Other than that I'm all
ears.
My 3 cents.
- Original Message -
From: Peter Olson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 19, 2004 8:43 AM
Subject: RE: [U2] [UD] running a subroutine
but i want more!
found it!
0001: PQ
on-the-fly, if a one-liner didn't fit the bill.
--Ron P.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
Sent: Wednesday, October 20, 2004 7:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
Biased as I may be, but my PRINT
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
Biased as I may be, but my PRINT example program will handle any of this and
much, much more instead of writing (and forgetting about) miscellaneous
procs and other small, limited use programs. It will give you more.
A problem
Mark Johnson [EMAIL PROTECTED] wrote on 10/20/2004 08:53:46
AM:
In fact, I welcome any criticisms or limitations anyone would have
against
establishing this PRINT command to handle everything.
This is an intriguing concept, and does seem to have its uses. A couple of
issues that occurred to
-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
Sent: Wednesday, October 20, 2004 5:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
[snipped]
In fact, I welcome any criticisms or limitations anyone would have against
establishing this PRINT
attitude: it's free so use it. :-) We should all post our free programs
there.
Bill
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
Sent: Wednesday, October 20, 2004 5:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
this is of some use. Someone asked me: why use anything else?. So I
don't. :-)
Bill
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Stu Glancy
Sent: Wednesday, October 20, 2004 9:49 AM
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
.
- Original Message -
From: Peter Olson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 9:51 AM
Subject: RE: [U2] [UD] running a subroutine
biases is sometimes a good thing. i just looked at it as exercise.
most if not all the subroutines i work with contain dynamic arrays
.
Thanks for your response.
- Original Message -
From: Timothy Snyder [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 10:09 AM
Subject: Re: [U2] [UD] running a subroutine
Mark Johnson [EMAIL PROTECTED] wrote on 10/20/2004 08:53:46
AM:
In fact, I welcome any
flame me for the name UPDATE. I'm being concise with a functional
name.
- Original Message -
From: Stu Glancy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 12:49 PM
Subject: Re: [U2] [UD] running a subroutine
Criticisms for Mark:
Your concept won't work
PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
Sent: Wednesday, October 20, 2004 17:18
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
True, but don't throw the baby out with the bathwater. If the program gets
sophisticated enough that starts using COMMONS or INCLUDES
Subject: RE: [U2] [UD] running a subroutine
I just have one all purpose test program called BBB (BBBecause it's easy
to
remember AND type)
This way when I test something, I just put in a STOP above the previous
test
stuff and then stick my new statements above that. This way if I ever
need
.:)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
Sent: Wednesday, October 20, 2004 17:18
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UD] running a subroutine
True, but don't throw the baby out with the bathwater. If the program
: Wednesday, October 20, 2004 9:14 PM
Subject: RE: [U2] [UD] running a subroutine
--
Incoming mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.280 / Virus Database: 264.12.0 - Release Date: 19/10/04
Regards,
Bruce Nichol
Talon Computer Services
ALBURY
a little expensive typing-wise / SELECT EVAL SUBR('SUB.NAME',VAR1,VAR2)
FROM VOC FIRST 1;
not sure about ud but with uv maybe we can create a proc :)
ED VOC TS
0001: PQ
0002: HSELECT
...a little less expensive typing-wise
Voc's TS entry
0001: PQ
0002: HSELECT
0003: H EVAL SUBR(
0004: A2
0005: H ) FROM VOC FIRST 1;
0006: P
tclTS
but i want more!
found it!
0001: PQ
0002: HSELECT
0003: H EVAL SUBR('
0004: A\2
0005: H',
One more possible solution:
This discussion intrigued me so I thought I'd give it a try for my
situation. I usually write subroutines with the first variable being
the 'RESULT; that way the sub can be used as an I-DESC or or used with
an ITYPE in a program as well as a CALL. I gave this a
I've always used some variation of most of these approaches to test my
subroutines. I was hoping there might be a more efficient (read easier
- I'm getting lazy) way. I see a couple that I need to take a stab at.
Thanks, everyone.
Shawn
---
u2-users mailing list
[EMAIL PROTECTED]
To
Universe certainly has it.
From: [EMAIL PROTECTED] on behalf of Jefferson, Jim
Sent: Mon 18/10/2004 15:04
To: [EMAIL PROTECTED]
Subject: RE: [U2] [UD] running a subroutine
Shawn:
Does UD have the UNASSIGNED function? I can't recall if even UV has it; I've
Wondering if there is a way to execute a subroutine from the colon
prompt.
I haven't seen anyone suggest using EVAL. This works for UV - I presume it
works for UD too. You may need to play with the return values.
SELECT EVAL SUBR('SUB.NAME',VAR1,VAR2) FROM VOC FIRST 1;
.
My 1 cent.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 18, 2004 10:03 PM
Subject: RE: [U2] [UD] running a subroutine
Wondering if there is a way to execute a subroutine from the colon
prompt.
I haven't seen anyone suggest using EVAL
Well, it was sunny yesterday Colin. But today, looks more like Cloudy LA!
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Alfke, Colin
Sent: Friday, October 15, 2004 17:05
To: [EMAIL PROTECTED]
Subject: RE: [U2] [UD] running a subroutine
Coming from D3 I
PM
Subject: [U2] [UD] running a subroutine
Wondering if there is a way to execute a subroutine from the colon
prompt.
Let's say I have a subroutine that is defined as having 2 input args
like:
SUBROUTINE subr.name(arg1,arg2).
I would like to test it from the colon prompt without having
PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 16, 2004 9:29 PM
Subject: Re: [U2] [UD] running a subroutine
If you read the article I wrote for Spectrum within the last 2 years and
for
Datastream in the early 1980's, I have a very powerful quick way to do
this
and virtually every
Wondering if there is a way to execute a subroutine from the colon
prompt.
Let's say I have a subroutine that is defined as having 2 input args
like:
SUBROUTINE subr.name(arg1,arg2).
I would like to test it from the colon prompt without having to
hard-code the values of arg1/arg2...something
)
STOP
compile ZZZ and you're there!
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Shawn Waldie
Sent: Friday, October 15, 2004 15:59
To: [EMAIL PROTECTED]
Subject: [U2] [UD] running a subroutine
Wondering if there is a way to execute a subroutine from
:[EMAIL PROTECTED] On Behalf Of Shawn Waldie
Sent: Friday, October 15, 2004 3:59 PM
To: [EMAIL PROTECTED]
Subject: [U2] [UD] running a subroutine
Wondering if there is a way to execute a subroutine from the colon
prompt.
Let's say I have a subroutine that is defined as having 2 input args
like
Goo'day,
Other than:
A small program to loop and prompt for var1 and var2 until, say, var1 =
'', CALLing subr.name(var1,var2), DEBUG, or whatever to see what comes back
from the subroutine and REPEAT
No...
At 08:59 16/10/04, you wrote:
Wondering if there is a way to execute a
I don't think there's a way to do that with a subroutine. What we
regularly do here is use input statements and pass the answers in DATA
statements. I know that's not the answer you want, so consider this:
get(arg.,1)VAR
if VAR = '' then
input VAR
end
To pass more than one commandline
Currently in Sunny LA - soon to head to Albuquerque!?!
-Original Message-
From: Shawn Waldie [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 3:59 PM
To: [EMAIL PROTECTED]
Subject: [U2] [UD] running a subroutine
Wondering if there is a way to execute a subroutine from the colon
prompt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Shawn Waldie
Sent: Friday, October 15, 2004 4:59 PM
To: [EMAIL PROTECTED]
Subject: [U2] [UD] running a subroutine
Wondering if there is a way to execute a subroutine from the colon
prompt.
Let's say I have
Why not write a short stub program to setup the args and then a CALL
statement to execute your subroutine? That's what we do very often.
You can either put in DEBUG statements in the stub program
before/after the subroutine call. 8-)
Andy Pflueger
Ivy Hill Corporation
Louisville, KY
On Fri, 15
Gosub parse.sentence
Subr.name = parsed.sentence2
Gosub get.arguments
Arg.count = dcount(arguments, @am)
Begin case
case arg.count = 0 ; call subr.name
case arg.count = 1 ; call subr.name(arguments1)
case arg.count = 2 ; call subr.name(arguments1, arguments2)
case arg.count = 3 ; call
:59 PM
To: [EMAIL PROTECTED]
Subject: [U2] [UD] running a subroutine
Wondering if there is a way to execute a subroutine from the colon
prompt.
Let's say I have a subroutine that is defined as having 2 input args
like:
SUBROUTINE subr.name(arg1,arg2).
I would like to test it from
48 matches
Mail list logo