Source language: Translate to:

understanding "type" in parameter

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

understanding "type" in parameter

Postby dpayer » Wed Aug 22, 2012 8:40 am

When we create a parameter for functions, we must choose which 'type' of data we will present.

How are these handled differently?

Examples:

if I have as a variable the path\name of a file, should I use that variable for the parameter as a 'variable' type or as a 'filename' type?

if I have series of routines that the function accomplishes and I do a VB case select to assign the routine, is it better to present that routine's name as text or as the variable with the routine's name assigned to its value?

Is the primary purpose to define the variable in the process NB uses to pass the info to the WSH host?

David P.
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby Neosoft Support » Wed Aug 22, 2012 12:15 pm

The primary purpose is to tell NeoBook how the parameter should be parsed before being inserted in the the script. If you define the type as a number then NeoBook will treat is as potentially containing a mathematical formula. If you define it as a variable, then NeoBook will treat it as a variable name and no pre-parsing will be done.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby smokinbanger » Wed Aug 22, 2012 3:08 pm

Neosoft Support wrote:The primary purpose is to tell NeoBook how the parameter should be parsed before being inserted in the the script. If you define the type as a number then NeoBook will treat is as potentially containing a mathematical formula. If you define it as a variable, then NeoBook will treat it as a variable name and no pre-parsing will be done.


HIJACK! 8)

Very good to know! I was wondering myself and I think this explains why I had a few functions not working properly.
smokinbanger
 
Posts: 198
Joined: Mon Jan 16, 2012 9:53 am
Location: United States


Return to NeoBook Functions - VBScript & JavaScript

Who is online

Users browsing this forum: No registered users and 1 guest

cron