diff --git a/docs/03.reference/01.functions/stringmap/_examples.md b/docs/03.reference/01.functions/stringmap/_examples.md new file mode 100644 index 000000000..781252164 --- /dev/null +++ b/docs/03.reference/01.functions/stringmap/_examples.md @@ -0,0 +1,7 @@ +```luceescript+trycf + myString="Hello World"; + closure=function(val){ + return (val & 'a') + } + writeDump(StringMap(myString,closure)); +``` \ No newline at end of file diff --git a/docs/03.reference/01.functions/toscript/_examples.md b/docs/03.reference/01.functions/toscript/_examples.md index 04370e1c6..07a688f0e 100644 --- a/docs/03.reference/01.functions/toscript/_examples.md +++ b/docs/03.reference/01.functions/toscript/_examples.md @@ -1,20 +1,30 @@ +```luceescript+trycf + // Struct + Struct = {}; + Struct[1] = "lucee"; + jsVar = serializeJson(Struct); + resStruct = ToScript(struct, "jsVar"); + writeDump(resStruct); + + // Array + Array = []; + Array[1] = "lucee"; + jsVar = serializeJson(Array); + resArr = ToScript(Array, "jsVar"); + writeDump(resArr); -```lucee+trycf - - - - - - The output of ToScript(myArray, "jsVar")
- #ToScript(myArray, "jsVar")#
- In a JavaScript script, convert thisString Variable to JavaScript - and output the resulting variable:
- -
+ // Query + Query = queryNew( "name,age", "varchar,numeric", {name = "Susi", age = 20 } ); + resQry = ToScript(Query, "Query"); + writeDump(resQry); + // String + Str = "test"; + resStr = ToScript(Str, "Str"); + writeDump(resStr); + + // Number + number = 10; + resNum = ToScript(number, "number"); + writeDump(resNum); ``` \ No newline at end of file diff --git a/docs/03.reference/05.objects/image/setantialiasing/_examples.md b/docs/03.reference/05.objects/image/setantialiasing/_examples.md new file mode 100644 index 000000000..41413a475 --- /dev/null +++ b/docs/03.reference/05.objects/image/setantialiasing/_examples.md @@ -0,0 +1,5 @@ +```luceescript+trycf + imgObj = imageNew("",150,150,"rgb","149c82"); + imgObj.setAntialiasing('off'); + cfimage(action="writeToBrowser", source=imgObj); +``` \ No newline at end of file