Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array problem on build
Message
From
24/11/2008 12:20:56
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01363805
Message ID:
01363807
Views:
14
This message has been marked as the solution to the initial question of the thread.
>hi all,
>I have code that saves a a file into a folder. what I want to do is look at the size of the file and if it is too small delete it and give a warning. I have taken out the relevant lines and included below. All seem to be correct but when i compile i get the following 'Unable to find Unknown MARRY1'
>
>mcallnum2 = SYS(5) + CURDIR() + "folder1\" + mfilename+ ".jpg"
>
>ADIR(marray1,('&mcallnum2'))
>
>IF ALEN(marray1,1) > 0
>    mfilesize = marray1[1,2]
>    * this figure, for the file size, is in bytes
>    IF mfilesize > 120000
>
>any help appreciated
>~M


Why not declare your array ?
>mcallnum2 = SYS(5) + CURDIR() + "folder1\" + mfilename+ ".jpg"

local marray1[1]

>
 IF ADIR(marray1,('&mcallnum2'))  > 0

>    mfilesize = marray1[1,2]
>    * this figure, for the file size, is in bytes
>    IF mfilesize > 120000
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform