repl. Every time you assign a value to a variable, the CommandBox REPL will output or echo the variable for you. Please note that in REPL mode the termination for a line of code is omitted. A line terminator in ColdFusion is the
aand reference it as
ais now an array.
#operators and using the variable name:
#hashes for output on assignments can be redundant:
<cfabort>, abort;. These are used to dump the entire contents of a variable to the browser, console or even a file. You can then leverage the
abortconstruct to abort the request and see the output of your dumped variables. This will work with both simple and complex variables. However, be very careful when using it with Nested ORM objects as you can potentially dump your entire database and crash the server. Leverage the
topargument to limit the dumping.
<cfparam>tag or the
isDefined()- Evaluates a string value to determine whether the variable
trueif the specified object is null, else
structKeyExists( key, value )- Verifies if the specified key variable exists in a structure.
String, Int, Float, Array, Vector, HashMap, etc. This is important because each variable you create has member functions available to you that delegate or reflect back to its native Java class.
java.lang.String. Therefore, the variable is typed as a String and can call on any method that
java.lang.Stringimplements. You can try this for the many types in CFML like structs, arrays, objects, etc.