Browse Source

cookbooks/devel/pseudovariables: docs for $defv(name) variable

Daniel-Constantin Mierla 2 months ago
parent
commit
c6eaf093ba
1 changed files with 15 additions and 1 deletions
  1. 15 1
      docs/cookbooks/devel/pseudovariables.md

+ 15 - 1
docs/cookbooks/devel/pseudovariables.md

@@ -254,7 +254,7 @@ Example:
 ``` c
 ``` c
 #!define ABC xyz
 #!define ABC xyz
 
 
-xlog("FLT_ACC: $def(ABC)\n");
+xlog("ABC: $def(ABC)\n");
 ```
 ```
 
 
 ### $defn(name) - Defined Value As Number
 ### $defn(name) - Defined Value As Number
@@ -269,6 +269,20 @@ Example:
 xlog("FLT_ACC: $defn(FLT_ACC)\n");
 xlog("FLT_ACC: $defn(FLT_ACC)\n");
 ```
 ```
 
 
+### $defv(name) - Unquoted Defined Value
+
+**$defv(name)** - return unquoted defined value. Works for both single and double
+quotes. If the defined value is not enclosed between quotes, then the value is
+returned as it is.
+
+Example:
+
+``` c
+#!define ABC "xyz"
+
+xlog("ABC: $def(ABC)\n");
+```
+
 ### $di - Diversion header URI
 ### $di - Diversion header URI
 
 
 **$di** - reference to Diversion header URI
 **$di** - reference to Diversion header URI