Compatibility: 6.7.x and 6.8.x
Platform: Mac & Win
Custom functions can be passed as parameters in order to return parameter values.
When coding 4D, one starts out by doing a direct assignment of values as parameters:
Soon, one begins to write generic code passing values contained in variables:
Another aspect of writing generic code that is not so readily apparent is the option of passing custom functions to return parameter values. Here is the ORDER BY command using a custom function, Shell_PointerToTableForField, to return a pointer to a table:
ORDER BY(Shell_PointerToTableForField ($pFieldToOrderBy)->;$ pFieldToOrderBy ->;>)
The Shell_PointerToTableForField method is explained and its code is shown in the tech tip titled "Deriving a table name from a field pointer" composed on 8/2/02.