Skip to content

Commit

Permalink
var scope errors on ColdFusion
Browse files Browse the repository at this point in the history
  • Loading branch information
akashbavlecha committed Jan 15, 2025
1 parent b54e09f commit 00a9001
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions data/en/querysome.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
{
"title":" The simple Querysome example",
"description":"Here,we've example to check whether the 75 is exists or not in myquery mark column value.",
"code":"<cfscript>\r\n var myQuery = queryNew(\"id,name,mark\",\"integer,varchar,integer\",[[1,\"Rahu\",75],[2,\"Ravi\",80]]);\r\n result = querySome(myQuery , function(details){\r\n\t return details.mark IS 75;\r\n });\r\n writeOutput((result ? \"Some\" : \"No\") & \" matches Record found!\");\r\n</cfscript>",
"code":"<cfscript>\r\nmyQuery = queryNew(\"id,name,mark\",\"integer,varchar,integer\",[[1,\"Rahu\",75],[2,\"Ravi\",80]]);\r\n result = querySome(myQuery , function(details){\r\n\t return details.mark IS 75;\r\n });\r\n writeOutput((result ? \"Some\" : \"No\") & \" matches Record found!\");\r\n</cfscript>",
"result":"Some matches Record found!"
},
{
"title":"The Query Member Function example",
"description":"Here,we've example to check whether the 85 is exists or not in myquery mark column value using query member function.",
"code":"<cfscript>\r\n var myQuery = queryNew(\"id,name,mark\",\"integer,varchar,integer\",[[1,\"Rahu\",75],[2,\"Ravi\",80]]);\r\n result = myQuery.Some(function(details){\r\n\t return details.mark IS 85;\r\n });\r\n writeOutput((result ? \"Some\" : \"No\") & \" matches Record found!\");\r\n</cfscript>",
"code":"<cfscript>\r\nmyQuery = queryNew(\"id,name,mark\",\"integer,varchar,integer\",[[1,\"Rahu\",75],[2,\"Ravi\",80]]);\r\n result = myQuery.Some(function(details){\r\n\t return details.mark IS 85;\r\n });\r\n writeOutput((result ? \"Some\" : \"No\") & \" matches Record found!\");\r\n</cfscript>",
"result":"No matches Record found!"
}
],
Expand Down
4 changes: 2 additions & 2 deletions data/en/structsome.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
{
"title":"The simple StructSome example",
"description":"Here we have simple example about structsome function.",
"code":"<cfscript>\r\nvar struct={\"Name\":\"Raja\",\"age\":20,\"mark\":80};\r\nresult = structSome(struct,function(key,value){\r\n\treturn key IS \"Name\"\r\n});\r\nwriteOutput((result ? '' : 'No')& \" Key Exists.\")\r\n</cfscript>",
"code":"<cfscript>\r\nstruct={\"Name\":\"Raja\",\"age\":20,\"mark\":80};\r\nresult = structSome(struct,function(key,value){\r\n\treturn key IS \"Name\"\r\n});\r\nwriteOutput((result ? '' : 'No')& \" Key Exists.\")\r\n</cfscript>",
"result":"Key Exists."
},
{
"title":"The structSome member function example",
"description":"Here we have simple example about structsome as member function.",
"code":"<cfscript>\r\nvar struct={\"Name\":\"Raja\",\"age\":20,\"mark\":80};\r\nresult = struct.some(function(key,value){\r\n\treturn key IS \"average\"\r\n});\r\nwriteOutput((result ? '' : 'No')&\" Key Exists.\")\r\n</cfscript>",
"code":"<cfscript>\r\nstruct={\"Name\":\"Raja\",\"age\":20,\"mark\":80};\r\nresult = struct.some(function(key,value){\r\n\treturn key IS \"average\"\r\n});\r\nwriteOutput((result ? '' : 'No')&\" Key Exists.\")\r\n</cfscript>",
"result":"No Key Exists."
}
],
Expand Down

0 comments on commit 00a9001

Please sign in to comment.