Created
May 16, 2018 09:51
-
-
Save trycf/9f2a60d78a641d179726ab02e16864e6 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
function FormatBoolean(required any MyBool, string Format = "default") { | |
switch(arguments.Format) { | |
case "YES/NO": | |
return YesNoFormat(arguments.MyBool EQ 1); | |
break; | |
case "default": | |
return "default"; | |
break; | |
default: | |
return (arguments.MyBool eq 1) ? "Yes" : ""; | |
} | |
} | |
test = FormatBoolean(true); | |
writeDump(var="#test#"); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment