Page 1 of 1

Cant undefine a variable

PostPosted: Mon Feb 06, 2017 3:17 am
by HackinHoodLogicsTm
Please i need help.
I have defined a Date Variable. As follows

Syntax: [ Download ] [ Hide ]
Using Neobook Syntax Highlighting
DefineVar "[1st]" "Date" "mm/dd/yyyy" "Global" "[MonthNum]"/01/[Year]"
 
Parsed in 0.005 seconds, using GeSHi 1.0.8.10


The above code works fine..
Now i want to undefine the "[1st]" variable and define another date variable into it.

This is how i undefine varaiable "[1st]"
ClearVariable "[1st]"

Then i get this error
"" is not a valid date value.

Please i need your help on this.
Thanks

Re: Cant undefine a variable

PostPosted: Mon Feb 06, 2017 6:44 am
by Gaev
HackinHoodLogics:

From the Help file ...
In order to delete a variable created with DefineVar, you must first re-declare the variable as “Undefined”, then clear it with SetVar. For example:

DefineVar "[Birthdate]" "Undefined" "" "Global" ""
SetVar "[Birthdate]" ""

Re: Cant undefine a variable

PostPosted: Mon Feb 06, 2017 8:10 am
by HackinHoodLogicsTm
Thanks...that works