Plum DEV Documentation
voicexml:tags:var

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

voicexml:tags:var [2014/06/02 10:23]
jennifer added meta description
voicexml:tags:var [2019/09/17 12:29]
Line 1: Line 1:
-{{description>​‹var› VoiceXML tag details, attributes and VXML code example | The var element declares a variable in executable content or as a child of form or vxml.}} 
-===== <var> ===== 
- 
- 
-This element declares a variable. It can occur in executable content or as a child of <​form>​ or <​vxml>​. 
-==== Attributes ==== 
- 
-| name | The name of the variable that will hold the result. | 
-| expr | The initial value of the variable (optional). If there is no expr attribute, the variable retains its current \\ value, if any. Variables start out with the ECMAScript value undefined if they are not given initial values. | 
- 
-==== Notes ==== 
- 
- 
-None 
- 
-==== Example ==== 
- 
-<​code>​ 
-<?xml version="​1.0"?>​ 
-<vxml version="​2.0">​ 
-  <​form>​ 
-    <var name="​test_var"/>​ 
-    <​block>​ 
-      <assign name="​test_var"​ expr="​1234"/>​ 
-    </​block>​ 
-    <​block>​ 
-      <​prompt>​ 
-        The test variable is set to <value expr="​test_var"/>​. 
-      </​prompt>​ 
-    </​block>​ 
-  </​form>​ 
-</​vxml>​ 
-</​code>​ 
- 
-The output of the above script would be: 
- 
-Computer: The test variable is set to twelve hundred thirty-four. 
- 
- 
-==== Child Tags ==== 
- 
- 
-None 
- 
- 
-==== Parent Tags ==== 
- 
- 
-[[voicexml:​tags:​block|<​block>​]],​ [[voicexml:​tags:​catch|<​catch>​]],​ [[voicexml:​tags:​error|<​error>​]],​ [[voicexml:​tags:​filled|<​filled>​]],​ [[voicexml:​tags:​foreach|<​foreach>​]],​ [[voicexml:​tags:​form|<​form>​]],​ [[voicexml:​tags:​help|<​help>​]],​ [[voicexml:​tags:​if|<​if>​]],​ [[voicexml:​tags:​noinput|<​noinput>​]],​ [[voicexml:​tags:​nomatch|<​nomatch>​]],​ [[voicexml:​tags:​vxml|<​vxml>​]]