Results 1 to 4 of 4
  1. #1

    creating custom functions


    How do you create a Custom function ?
    If you can create a custom function can you ad the same to the function generator ?
    If you had to create a custom function and store it to be reused would you store it in a separate module ?
    Hope my q was not too confusing
    Thank you.

  2. #2

    Re: creating custom functions

    I am using a "startup test" for my public functions.

    Here is the basic structure:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">public function echo(in MsgString)
    }</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">You can add them to the function generator too, although it isn't worth the trouble in my opinion. I just comment the startup test well.

  3. #3

    Re: creating custom functions

    2. generator_add_function() is the method available to add your function to the function generator.

    3. Yes. Its always better to store the function which can be used in other scripts in a separate module.

  4. #4

    Re: creating custom functions

    Well, I like having my functions in the function generator. If you have lots of functions (I have to maintain test libraries for several projects) you will appreciate the code autocompletion for custom functions (that's also a feature of generator_add_function()).

    I've created a script that parses my compiled modules and generates the entries for the function generator (out of the function declaration and comments). So adding a function to the generator is not more effort than commenting the functions...




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:37 PM.

Copyright BetaSoft Inc.