from the FP Room today...
John Esak
alpha at valar.com
Tue May 2 10:35:06 PDT 2006
Yes,
Below (your change) is a much better way to do this... but, I was just
giving the idea of what needed to be done to some folks who asked the
question. It was something I put up in about 2 minutes, and I wasn't sure at
first if the fields were contiguous or differing edit types. I thought
briefly about showing it as an array, but it added that one level of
complexity. Actually, it is not only less complex, but eliminates any other
coding and covers the whole file. The only thing I was going to shoot for
next that I knew the array couldn't handle was adding an edit type to
(value). At least, I didn't want to thrash out how important edit validation
was going to be. I was on my way into a conference call and under the gun.
John
P.S. - Those are my excuses for not showing them the best way to do this...
did I mention also that the sun was in my eyes and my shoes were too
tight... also?? :-)
> -----Original Message-----
> From: Kenneth Brody [mailto:kenbrody at bestweb.net]
> Sent: Tuesday, May 02, 2006 1:10 PM
> To: alpha at valar.com
> Cc: Fplist (E-mail)
> Subject: Re: from the FP Room today...
>
>
> Quoting John Esak (Tue, 2 May 2006 12:34:33 -0400):
>
> >
> >
> > To the guys who were in the FP Room today... you probably figured it
> > out...
> > but here is the corrected prc.table. It posts (value) to the designated
> > field. Hope you caught that.
> > JE
> >
> >
> > :field ne "":goto doit:
> > ::declare field(3,.0,g), value(30,*,g):
> > ask_f::input popup field "Which field do you want to modify? ":
> > :@sk eq "BRKY":exit:
> > :field eq "":goto ask_f:
> > ask_v::input popup value "What value do you want to put in this field?
> > ":
> > :@sk eq "BRKY":exit:
> > doit:'doit::
> > ::gosub (field) of do_1, do_2, do_3:
> > ::end:
> > do_1:'do_1::
> > ::1=value; return:
> > do_2:'do_2::
> > ::2=value; return:
> > do_3:'do_3::
> > ::3=value; return:
>
> I wasn't in the room, so perhaps you are doing more than is apparent
> by just looking at this snippet.
>
> However, why not just replace the doit lines with:
>
> doit
> Then: dim MyRecord[3]:1
> If: field gt "0" and field le "3"
> Then: MyRecord[field] = value
> Then: end
>
> The "if" line can be eliminated if you pre-check "field" for valid
> values.
>
> --
> KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
> http://www.hvcomputer.com
> http://www.fileProPlus.com
More information about the Filepro-list
mailing list