Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rusty on the syntax - how to fix this?
Message
From
14/07/2017 17:45:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01652659
Message ID:
01652661
Views:
68
>Hi everybody,
>
>We had the following code in one of the old program:
>
>
>if inlist(type("&ImageSource"), "M","Q","W") and len(&ImageSource)>1
>			cOFile = GenOFile(".jpg",.t.)
>			copy memo &ImageSource to (m.cOFile)
>			cOFile = E0Resize(m.cOFile, dpi)
>		endif
>
>
>Please note the line copy memo &ImageSource and check for the type above.
>
>That worked fine when ImageSource was something like 'tableName.photoColumnName'
>
>Now I want to change the above to be
>
>ImageSource = [someDecryptFunction('functionName', 'tableName', columnValue, 'photoColumnName')]
>
>The above code doesn't work anymore :(
>
>I can get the value using
>
>lcValue = evaluate(ImageSource)
>
>But what should I do with this value now? How can I copy that value into the file?
>
>Also, how can I check if the format of my ImageSource is still TableName.ColumnName or it's something more complex like that extra function?
>
>Thanks a lot in advance.

type() and vartype() evaluate expression into a internal try/catch block, a error return "U".
VFP doesn't execute UDF.
Uses a try/catch to simulate type() function.
Previous
Reply
Map
View

Click here to load this message in the networking platform