View previous topic :: View next topic |
Author |
Message |
dmonckton Contributor
Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Mon Dec 10, 2018 3:40 pm Post subject: Maximum number of User defined Functions |
|
|
Hi All
Its been a long time!
In VDS 5.0 is there a maximum number of User defined Function available?
I have been upgrading an old script and added a couple of new functions. Now VDS hangs when I try and compile and I have to use task manager to crash out. I've done a lot of testing and its something to do with the '#define function' statement. I've tried changing the function names but it still hangs. The conclusion I have come to is that there must be a maximum number of User function available and I have gone over that limit.
Any ideas?
Regards
David |
|
Back to top |
|
|
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sat Dec 22, 2018 11:41 pm Post subject: |
|
|
Hi David,
You may have found the answer already, but in case anyone else searches and finds this topic I'll answer your question.
I don't know of a limit on the number of User Defined Functions (or User Defined Commands) but there is a limit of the combined length of User Defined Function names, and the same for User Defined Commands.
This length is derived from combining all #define functions in the script including all #define functions inside any included dsu files. Same for #define commands.
Solutions:
1. Use short user defined function names (and command names).
2. If you can, combine multiple user defined functions together so you only need to use one function name for multiple functions. This would require calling the function with the first parameter containing an argument so your combined function knows which sub part of the function to run.
I also seem to remember that each user function name needs to be 100% unique. i.e. A function named Net will cause issues if there is also a function named NetTime. _________________ cheers
Dave |
|
Back to top |
|
|
dmonckton Contributor
Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Wed Jan 02, 2019 6:22 pm Post subject: |
|
|
Hi Dave
Sorry for the late relay, I've been away for the festival period.
Your advice worked, I reduced the number of functions used in the program and it compiled. So there must be a maximum string length when all the functions are added together.
I don't think the functions names have to be unique as I have a whole family of MIDI functions starting midiIn and midiOut and the program still compiles.
Thanks for your fast responce.
Kind regards
David Monckton |
|
Back to top |
|
|
|