Results 1 to 3 of 3

Thread: Overhead

  1. #1
    Ran Guest

    Default Overhead

    Hello all,<BR><BR>As I understand it, there is no special problem in sending any type of argument to a VBScript function or sub. However, in the many code samples I have gone through, rarely have I seen an object or an array being sent to a function, either by reference or by value.<BR>My question is (finally) - is there a special reason for not doing so? Is the overhead too high? would it be better to write and use a Visual Basic dll to process and manipulate large arrays or objects?<BR><BR>Thank you in advance,<BR>Ran.

  2. #2
    Rob Guest

    Default RE: Overhead

    That would create a unique situation where you would send an array to a function. Generally that would mean the array has already been created globally and then sent to the function for processing. Which means if you do not use the function you have created the array for nothing. And if it was created globally, why bother. The function has access to it anyway.<BR><BR>I just finished an app that was a database monster where I used several arrays to hold database queries so I did not have to keep hitting the database every loop. I built the SQL statements and arrays when the page loaded but I only accessed the arrays inside the functions. <BR><BR>Rob

  3. #3
    Join Date
    Dec 1969

    Default RE: Overhead

    I&#039ve used arrays as function arguements quite frequently and never noticed any problems. I find they come in handy for wrapper functions where you might want a variable number of arguements - for example a wrapper for a SQL INSERT that takes an array of field names and an array of values as input (it would usually take a table name and a connection string as well). By using arrays you can use the same function to insert a value into a single field or to insert an entire row.<BR><BR>I just get the impression that many people aren&#039t that comfortable with arrays.<BR><BR>Dunc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts