>Does anyone know where I can find I big list of shortcut functions/coding syntax to help slim down the code making it smaller and/or neater?
>
>For example:
>
>
>IF test = X .or. test = Y .or. test = Z could be IF INLIST(test,X,Y,Z)
>or
>IF LEN(ALLTRIM(test)) = 0 could be IF EMPTY(test)
>
>
>There are always some we either don't know about, or haven't used in a long time and forget about...
Here is another neat shortcut that I just remembered.
Sort in a specified sequence that depends on letter codes, which are not in alphabetical order (for example, S, M, L, X for small, medium, large, eXtra large):
select *, at(SizeCode, "SMLX") as OrderKey;
...
For larger groups of letters, you can use the wordcount functions in a similar way (use it to return a position), or used a fixed width. For example, to get the number of a month based on a 3-letter abbreviation.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)