PDA

View Full Version : Copy to array



Quailco
2014-01-09, 14:37
Hello again

Copy to array does not appear to create the array if it doesnt already exist? If this is true it is worthy of being added to the exception list for VFP commands. I know I will have a lot of corrections to make if it doest.

TIA

Jim

davefoss
2014-01-09, 15:15
Hi Jim,

I hate to sound like a broken record, but this works for me as well. Are you using the latest RC build?

Quailco
2014-01-09, 16:30
i HAVE VARIED THIS IN FURTHER TESTING EVERY WAY I CAN THINK OF INCLUDING SETTING UP THE ARRA IN ADVANCE NO LUCK

jIM
sorry bout the caps they are turned on in the app

Quailco
2014-01-09, 16:32
Dave

Yes downloaded and installed as soon as it was released

Hmm gotta be somethin can u show me ur test code maybe i can spot it from that

this is the error
Thu Jan 9 13:28:18 2014
**** Lianja error ****
to arra MA FOR MTYPE=mmenu AND (LVL=0 OR LVL>=SECURITY) AND!EMPT(CAP) fiel CAP,type,action
^
Syntax error in command
Called from program - test7.dbo at line 6

and this is my test code

security=0
mmenu='MENUB'
COUNT TO NOITMS FOR MTYPE=mmenu AND (LVL=0 OR LVL>=SECURITY) AND!EMPT(CAP)
dime ma(noitms,3)
COPY to arra MA FOR MTYPE=mmenu AND (LVL=0 OR LVL>=SECURITY) AND!EMPT(CAP) fiel CAP,type,action

davefoss
2014-01-09, 16:36
Hi Jim,

At the console:

open database southwind
use customers
copy to array myarray
disp memo

Doesn't get any simpler than that. :-)

hmischel@diligentsystems.com
2014-01-09, 17:24
Hi Jim, Dave,

I can fix broken records :)

Lianja seems to be looking for the full word (at least in my version on this particular environment).

So - this gives me an error


copy to arra myarray
This works


copy to array myarray

Herb

davefoss
2014-01-09, 17:40
Hi Jim, Dave,

I can fix broken records :)

Lianja seems to be looking for the full word (at least in my version on this particular environment).

So - this gives me an error


This works



Herb

Good eye Herb! :-)

Quailco
2014-01-09, 17:56
sorry bout the extra posts urs didnt ketch up to me right away

anyhow i chged arra to array and it works

should be noted in exceptions please :)

I have found a few places where the 4 character abreviations do not work and I consistently in development use them so got my work cut out lol

Jim

HankFay
2014-01-09, 19:36
Use alt+T, and then Y in VFP: that will fill out all your abbr's in that document. There's probably an add-on somewhere that will do it for you, as well -- I think the beautify code is available on VFPX, or in Sedna, one or the other.

Hank

barrymavin
2014-01-09, 22:43
Hi Jim,

Abbreviated commands and functions work in most cases.

With functions, some of the abbreviated names e.g. strt() can be strtran() or strtofile(). This is a language implementation difference when there are multiple function names that could be abbreviated. Lianja uses a hashed symbol table, it does not do a sequential lookup of these. Its only a few that have issues, and it looks like you found one :)

When in doubt use the the full name.