Cant undefine a variable

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Locked
User avatar
HackinHoodLogicsTm
Posts: 131
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana
Contact:

Cant undefine a variable

Post by HackinHoodLogicsTm »

Please i need help.
I have defined a Date Variable. As follows

[syntax=neobook]DefineVar "[1st]" "Date" "mm/dd/yyyy" "Global" "[MonthNum]"/01/[Year]"
[/syntax]

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
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: Cant undefine a variable

Post 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]" ""
User avatar
HackinHoodLogicsTm
Posts: 131
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana
Contact:

Re: Cant undefine a variable

Post by HackinHoodLogicsTm »

Thanks...that works
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
Locked