On Tuesday, April 12, 2022 at 11:12:17 AM UTC-7,
wr.now...@gmail.com wrote:
> I am using Xprompt on Windows 7
> My code is as follows:
>
> Request dbfntx
[...]
> local mmpn,mmpi,mmpt,mcsp
>
> proc main()
[> set defaultrdd("dbfntx") > sele 1 ]
> use g:\f7_\llm____
> do whil .t.
... you have just opened the file, you are likely at BOF.
[> goto bott ... syntax error? goto expects a record number.
> go bott]
> do whil !bof()
[...] statement moved up
> local subs(x,1,1) := T
... neither 'x' nor 'T' have been defined
... you cannot make a function (the LHS of the :=) local.
> mmpn := mpn
> mcsp := csp
> mmpi := mpi
> mmpt := mpt
>
> local mpn := mmpn
What the hell are you trying to do with the above statement? "LOCAL" has a meaning, it defines a symbolic name, and optionally assigns it a value. You have already used 'mpn' about 5 lines before. And if 'mpn' is a field name in your database, you have created another memory variable with the same name. Now you will have to reference the DBF field with llm____->mpn
> repl all csp with mcsp,mpi with mmpi,mpt with mmpt
>
> local subs(x,1,1) := T
... same crap
> if bof()
... recommend you issue CLOSE ALL
> rele all like m*
... includes DBF field names, right?
> exit "Dan: THIS is why it would not be an infinite loop, if it did not have other errors."
> retu
... only makes sense at the end of a function. The following "else" (just below) ends the true condition processing.
> else
> skip -1
> endi
> endd
> endd
... this entire "do while .t." and second "endd" loop are pointless.
> retu
>
> Any assistance would be appreciated.
What are you trying to do?
What did you think you were doing with 'local subs(x,1,1) := T'
David A. Smith