Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-02-2019, 05:41 AM
hrZN hrZN is offline
Registered User
 
Join Date: Sep 2019
Posts: 2
Question Error when declaring the variable type

Why do I always get an error when I declare the variable type?
For example if I put the following statement in my script I get an error:

Dim B As Boolean
Reply With Quote
  #2  
Old 10-02-2019, 08:40 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,049
Hi hrZN,

I'm not sure how this relates to one of our products, but what error do you get?

What scripting language are you using?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 10-02-2019, 12:48 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,049
Hi hrZN,

It sounds like you are trying to use Visual Basic, not VBScript. SecureCRT supports VBScript, and in that language you do not specify a type (because all variables in VBScript are of type VARIANT).

So instead, you would use:

Dim B
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #4  
Old 10-02-2019, 02:38 PM
hrZN hrZN is offline
Registered User
 
Join Date: Sep 2019
Posts: 2
Thank you Brenda, yes I thought it was Visual Basic, I did not know it is VBScript. That is a very useful information for me.
Reply With Quote
  #5  
Old 10-02-2019, 03:50 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,049
Hi hrZN,

One good resource is our VBScript manual, Scripting Essentials.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:46 PM.