When developing a VFE form, is the function name Case Sensitive? If the function definition looks like:
fn this_IS_my_FUNCTION(){ do something return (results)}
Will calling the function with various permutations of case result in the function being called and executed correctly?
x = this_is_my_function()
y = THIS_IS_MY_FUNCTION()
z= this_IS_my_FUNCTION()
Will x, y and z all return the same results? Or will z be the only one with results. Does it matter if the function being referenced is a standard ccc function buried in one of the CCC-fndefx.ccc files?
Case insensitive.
I believe functions in MEL are not sensitive to case. Functions are case sensitive if you are developing HTML forms because you use JavaScript.
The function can be called multiple times and the result can be assigned to different document variables. The result may be different depending on your coding logic. Keep in mind you can pass different values to your function as well (e.g. creating a function that returns Body Mass Index calculation when height and weight are entered) if you want the function to generate a dynamic value.
I am not sure I understand your last question, but you can store functions natively within the code of the form (using the code builder/function pane in VFE) and also reference functions that are stored in libraries that are accessible by the client.
Case insensitive. Availability is determined where the function is located (on a form or as a library/text component or as an external file (user lib/ccc text file).
A function by the same name, regardless of the case, will return what you code it to return, regardless of the variable name you assign the result. So yes, x, y, and z will all contain the same result as long as the same parameters are run through the function.
A word of caution. Using CCC functions outside of a CCC form might be OK if all references it contains also exist in the udpate. CCC uses a lot of dependencies, so vet the code well and MEL trace to understand what is happening in each line of executed code. If there are any issues, you should be able to identify them in the trace and address them accordingly.
Lastly, understand that even though (or especially since) function names are not case sensitive, you need to be unique in naming conventions. Know that when two functions with the same name are loaded into memory, the last loaded version will overwrite the existing version. This means any variances in the previous version will be lost. So if you load 3 different versions with the same name in an update, version 2 will overwrite version 1 and version 3 will overwrite version 2. Since user lib/ccc text files are loaded on EMR startup and therefore always first, this can wreak havoc in your MEL code if you are not attentive.
Hope this helps.