doedit command
Joe Chasan
joe at magnatechonline.com
Wed May 2 07:55:35 PDT 2012
On Wed, May 02, 2012 at 09:28:54AM -0400, Dan McCabe wrote:
> I am running filepro 5.0.14 on a SCO 5.0.6. I am trying to calculate a
> total amount and have it print both in the usual numeric format and also in
> the word format, such as on a check. I have tried several things, first I
> tried:
>
> ta = doedit(t,"rfdol") - the result is blank. rfdol is a modified
> version of cheque. I have also tried it with the global edit cheque and
> the result is still blank.
>
> Next I tried to create a temp file to hold the information I need. I set
> up an 80 character field with the edit "rfdol". When I put the numeric
> amount in via processing, it won't work, but if I do it through IAU, it
> works fine.
>
> Any suggestions to fix this are appreciated.
not knowing length/type of 'ta' or 't', nor knowing the composition
of edit 'rfdol' makes it difficult for someone to guess.
simple case:
t(10,.2)="15.00"; ta(undefined)=doedit(t,"cheque") FAILS.
Why? because from the help page for
xx = DOEDIT(val_expr,edit_expr,len_expr)
"If len_expr is not specified, the length of val_expr is used."
You cannot fit all those words into length 10 (length of t).
even if 't' was not defined, it would take on the length required by
the arithmetic expression that produced it, which again is going to be
way too small.
so, fixing for the above by giving a length to the doedit:
t="15.00"; ta=doedit(t,"cheque","75") works fine.
now - if t contains a $,- or has more than 2 decimal places in it, that
is another possible failure. edit 'cheque' won't handle those. again,
not sure what your edit 'rfdol' does so that may or may not apply.
does not handle.
if the above does not help you, please post back definitions of
t, ta, the edit 'rfdol' and the field value that fails.
--
-Joe Chasan- Magnatech Business Systems, Inc.
joe - at - magnatechonline -dot- com Hicksville, NY - USA
http://www.MagnatechOnline.com Tel.(516) 931-4444/Fax.(516) 931-1264
More information about the Filepro-list
mailing list