Skip to content

Commit 9f56104

Browse files
committed
$$$Public and $$$Private macros for debugging. Related docs.
1 parent 5340923 commit 9f56104

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

MDX2JSON/MDX2JSON.inc.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
#include %ZEN.Utils
66
#define get(%name) $get(%request.Data(%name,1))
77
#define Debug $d(%request.Data("Debug"))
8+
#define Public ((%request.GetCgiEnv("SERVER_PORT") = 80) || (%request.GetCgiEnv("SERVER_PORT") = 443))
9+
#define Private '$$$Public
810
]]></Routine>
911
</Export>

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ Use $$$Debug macro. It would evaluate as true only if there is a "Debug" URL par
8282

8383
http://localhost:57772/MDX2JSON/MDX?Namespace=Samples&Debug
8484
85-
Use with postconditional expressions, or other flow control statements
85+
Use with postconditional expressions, or other flow control statements:
8686

8787
w:$$$Debug "debugging"
8888
if $$$Debug { w "debugging" } else { w "not debugging"}
89+
90+
Also available are $$$Public and $$$Private macros. Evaluates to true based on request port (80 and 443 is public, private otherwise).

0 commit comments

Comments
 (0)