PDF Explorer > General

Archive Extension grid column

<< < (2/2)

RTT:

--- Quote from: Padanges on August 24, 2016, 02:08:21 PM ---But the code gives no answer. Could you help with this? Documentation description for the pos() function is quite minimal. I guess that's where the problem lies.

--- End quote ---
Just change fn to f in the pos function call. Fn doesn't exist as field reference constant.
The pos function reference .


--- Quote from: Padanges on August 24, 2016, 02:17:50 PM ---If one would like to match, for example, file names which have words "and" in it, would it be possible to do that using: pos(#97#110#100, grid.cell(lowercase(fn),$i))<>0; as in the previous script?

--- End quote ---
Sure, but there is not need to use char codes for that. Just type the string you want to find, using single quotes. i.e pos('and', lowercase(grid.cell(f,$i)))>0.
The lowercase function is to be used in the grid.cell result, not to pass the field name lowercased. And again, the filename reference constant is f, not fn.


--- Quote from: Padanges on August 24, 2016, 01:31:27 PM ---Is this syntax based on any language?

--- End quote ---
This weird syntax is from a component named TArtFormula. Google it if you want to know more. The credits to the author are in the program about box.

Padanges:
Thanks, the code works fine now :)
We can dynamically check for substring in a given string, for example, for a sequence of characters in a given file name string. But can we check whether it contains any digits (without using a cycle which loops through all the possible number characters)? More specifically, can we dynamically check for any four digit integers present?
Are we bound to use only the functions (for dynamic evaluations) given in this list: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/System.html ?

RTT:

--- Quote from: Padanges on August 25, 2016, 11:13:37 AM ---But can we check whether it contains any digits (without using a cycle which loops through all the possible number characters)? More specifically, can we dynamically check for any four digit integers present?

--- End quote ---
No specific function for that, so no.

--- Quote ---Are we bound to use only the functions (for dynamic evaluations) given in this list: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/System.html ?

--- End quote ---
You can get the list of the currently supported functions from the user's guide.

Padanges:
Can we have subprocedures (user defined functions) within "eval expression"?

RTT:

--- Quote from: Padanges on August 27, 2016, 06:55:36 AM ---Can we have subprocedures (user defined functions) within "eval expression"?

--- End quote ---
No. But the component can be extended with custom functions, so I'm going to check the feasibility of a custom function to call a script  ;)

Navigation

[0] Message Index

[*] Previous page

Go to full version