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 


Include DSC -vs- Include DSU

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


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon Feb 27, 2006 4:08 am    Post subject: Include DSC -vs- Include DSU Reply with quote

Hello all,

It seems that I have reached the dreaded 220 user defined variable limit in a large progect that I'm working on. I have trimmed it the best that I canand it now works, I still have more features to add that will break the limit once again.

I have several DSCs included in the main script kinda like modules which makes it easier for me to focus different aspects of the program.

What I want to know is if I make the individual scripts into DSUs are they treated as completely different entities that communicate with the app? There by the main app doesn't see the variables used in the DSU and only what's passed between the two.

Thanks in advance

Aslan
Back to top
View user's profile Send private message Send e-mail
Estas
Contributor
Contributor


Joined: 31 Jan 2004
Posts: 66
Location: Germany

PostPosted: Mon Feb 27, 2006 5:14 pm    Post subject: Reply with quote

Hi,
I believe not. Using precompiled dsu-files won`t solve your problem.
Alternative: Split-up your program into 2 or more parts, compile them both into seperate exe-files. One main-exe, the other one as an embededed exe that is extracted when starting your main exe or whenever its needed.
Pass on all your variables using %1...%9 by calling/running the embedded exe: run myprog.exe %1 %2
In my case: %1 contains the index which sectikon to jump to:
eg. if %1=1 goto xxx, if %1=2 goto yyy etc...
%2 contains the variables needed in the embedded file...
%2 = "name|street|..." etc.
That way You can pass on more than 1 Variable in %2 using the field seperator.

Thats how I solved my little variable problem, now using more than 340 different variable names, not all at the same time though...
Greetings Mike

_________________
Greetings to all the folks back home in the States. A friendly "hola -como estas" to all my friends from Spain and Greece.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Mon Feb 27, 2006 9:21 pm    Post subject: Reply with quote

I use the registry to store certain information on a temporary basis in order to get around this problem...

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
trapper
Contributor
Contributor


Joined: 28 Jan 2005
Posts: 112
Location: Brisbane, Australia

PostPosted: Tue Feb 28, 2006 7:33 am    Post subject: Reply with quote

I use dialog elements to 'break' both the 220 user-defined variable limit and the 32 string lists limit. I place the elements at a position that will never be seen...
Code:
  dialog add,text,CHNLNAVTEXT,5000,0,0,0,%s
  dialog add,list,CHNLNAVLIST,5000,0,0,0

Of course, you can only refer to these dialog elements when the dialog they are on is the current window. Also, I think I read somewhere that dialog elements may not be as fast as normal variables and lists but this hasn't proven to be a problem to me.

Cheers...

_________________
John Trappett
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Mar 12, 2006 5:41 pm    Post subject: Reply with quote

Theoretically, can you make a dll with VDS assuming it doesn't contain any graghical elements?

It would be nice if you could a make dll for custom functions without using DDE. Maybe create a VDS EXE and change the extention to DLL.

This may sound like a silly question but I don't know how VDS comunicates with DLLs.
Back to top
View user's profile Send private message Send e-mail
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sun Mar 12, 2006 6:26 pm    Post subject: Reply with quote

DLL's are compiled differently than EXE's, so that's not really a posibility.
I have used VDSMEM in the past to get around this, although you really shouldn't need more than 200-some variables(It was lazy programming on my part). Unless you are holding 200 names or something for a database type program.
You can get VDSMEM here:
http://www.vdsworld.com/search.php?keywords=vdsmem&match_type=0

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Mar 12, 2006 7:13 pm    Post subject: Reply with quote

Hi SS,

It is a heavily DB driven app. My variable names reflect column names and access multiple tables. I agree that this may be a lazy way of using variables but it would be a complete nightmare to troubleshoot without using them this way.

I'm trying to convert my query results to more of some type of an array.
I can concantonate my results as a single string and assign the string to a variable name that reflects the query and then parse out the fields using reusable vars (e.g. %%Col1, %%Col2, etc...)

This will cut down on the number of variables at the moment but this app is still growing. The trick I'm trying to pull off is modularizing it. (kinda like plugins or extentions) Having the main interface with basic capabilities, with the option to add more using addons later on.
Back to top
View user's profile Send private message Send e-mail
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Mon Mar 13, 2006 1:06 am    Post subject: Reply with quote

i don't know if this will help but i will share it anyway

sometimes i need a temporary variable to process a list or to do something, i then use %%dummy or %%temp as the name of that variable

and given that the variable is temporarily used, i use it again and again ... i have found this to be a great way to reduce my number of variables

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
bjdavis
Valued Newbie


Joined: 03 Jan 2002
Posts: 28
Location: Jacksonville, FL

PostPosted: Wed Mar 22, 2006 4:07 pm    Post subject: Reply with quote

Maybe instead of storing your info in a variable you can store them in a list.
When you need the info just get it from the list.

_________________
B.J. Davis, MCSE
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Thu Mar 23, 2006 1:22 am    Post subject: Reply with quote

What I ended up doing is storing multiple values as an array in single variables.

Thanks to all for your responces.

Aslan
Back to top
View user's profile Send private message Send e-mail
webdaddy
Contributor
Contributor


Joined: 14 Nov 2004
Posts: 151
Location: Raleigh NC

PostPosted: Fri May 12, 2006 6:57 pm    Post subject: Another Thought Reply with quote

Another thing that I have done when I get close or hit the variable limit is to use a inifile. Works well for holding information and strings of information temporarily. There really isnt that big of a performance hit on faster machines with fast hard drives so its all good. Othertimes I will use list and add them to various positions in the list and then seek them as needed.

WD

_________________
K Wetzel
Programming - Technology - Communications
"The Home of the SLC Security Console"
SLC now available for Linux...
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
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