forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Maximum number of User defined Functions

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 114
Location: Lewes, U.K.

PostPosted: Mon Dec 10, 2018 3:40 pm    Post subject: Maximum number of User defined Functions Reply with quote

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
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 404
Location: Australia

PostPosted: Sat Dec 22, 2018 11:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 114
Location: Lewes, U.K.

PostPosted: Wed Jan 02, 2019 6:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group