Page 1 of 1

understanding "type" in parameter

PostPosted: Wed Aug 22, 2012 8:40 am
by dpayer
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.

PostPosted: Wed Aug 22, 2012 12:15 pm
by Neosoft Support
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.

PostPosted: Wed Aug 22, 2012 3:08 pm
by smokinbanger
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.