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 


Coding instructions

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Lucyfer
Newbie


Joined: 06 Apr 2002
Posts: 16
Location: Quebec/Canada

PostPosted: Sat Apr 06, 2002 4:26 pm    Post subject: Coding instructions Reply with quote

Hi,

One great thing featured in 4DOS/4NT scripting is the ability to create
variables out of other variables...

Ex.: the next code (for 4DOS)
Code:
C:\>Set Test=4
C:\>Set Test2=6
C:\>Set MyVar[%Test]=First_line
C:\>Set [MyVar%Test][%Test2]=Second_line
C:\>Set
....
Test=4
MyVar4=First line
First_line6=Second_line
C:\>_

I could've had a better example, I know, but my sources are long gone..

It would be really nice to have such a possibility, as it would cut down code and some useless iterations (repeat/while/...).

Of course, as I've had the habit of using it I could look like the only one that would use this..

This could look like..
Code:
%T = 1
%%File[%T] = Help.hlp

Variable '%%File1' would've been created, holding 'Help.hlp'


For this to work, []'s should remain invalid characters in a variable name, as it is already.

Someone else interested in this? Take your time... Wink
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Fri Apr 12, 2002 11:07 pm    Post subject: Reply with quote

Hi Lucyfer,
I think you are refering to Variables that are actually Arrays. I have always used VDS List's in place of Arrays.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Lucyfer
Newbie


Joined: 06 Apr 2002
Posts: 16
Location: Quebec/Canada

PostPosted: Sat Apr 13, 2002 2:42 pm    Post subject: Reply with quote

mindpower:

Arrays could well do it, but we are kind of limited in lists, you see...
I won't be using lists above 9 'till the debug window is fixed, 'cause right now we can't monitor lists 10 to 16 even is these are usable...

Of course, now that i've learned the existance of the second option of @item(), I will certainly give it a second thought and optimize some code... Wink

Thanks, this was helpful!
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sun Apr 14, 2002 8:40 pm    Post subject: Reply with quote

Hi Lucyfer,
You can go above List 9 just by making hidden listboxes. If you add a listbox and hide it then you can call the list by name. Also there is a DLL called vdsaray.dll here on this forum. I think that Tommy has released a DLL that will give you unlimited number of list's as well.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sun Apr 14, 2002 9:42 pm    Post subject: Reply with quote

The point he mentions though is that with any of the alternatives, the
list contents cannot be shown in the debug window in the VDS IDE Sad

Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Apr 14, 2002 10:00 pm    Post subject: Reply with quote

_____________________________________________________________
Have you tried adding lists like this instead of hiding them?

DIALOG ADD,LIST,L1,0,0,0,0

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Lucyfer
Newbie


Joined: 06 Apr 2002
Posts: 16
Location: Quebec/Canada

PostPosted: Mon Apr 15, 2002 5:52 pm    Post subject: Reply with quote

Hi!

Tommy got it right, those can't be viewed Sad . I used hidden Editboxes as arrays before (needed 6 locations..) and lists. It's a way of getting some intelligent variables names.

As every programming text/book are trying to teach, we must always use intelligent variables/labels/... it's a bit different with VDS I guess.. Wink

Tommy: What about a dll-gateway dll? I'd like to compress files with, say, info-Zip (so I can distribute it..) but I don't think I can access those kind of dlls using EXTERNAL zip.dll... You see? This would be cool!...

Bye
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Tue Apr 16, 2002 1:45 am    Post subject: Reply with quote

I tried, and couldn't manage to make one. Sad I think it involves coding
pieces in assembler, which I'm not familiar with. Also even if some calls
could be made to work, others may not, as VDS for example doesn't
have the ability to create structured objects.

Maybe Mindpower's API calling DLL is something to wait for for you...

Best regards,

Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue May 07, 2002 1:13 pm    Post subject: Reply with quote

Hi All,
BTW Lucyfer yes you would be able to make a little debugger that could monitor VDS listboxes or editboxes everytime an item is added using my Gadget... I am going to release the freeware only version as soon as I get my webserver up and working so everyone will have a chance to play with my gadget dll. Since Mr. Garrett is going out of business and I was on his server Sad
Actually Tommy and everyone else. I have been looking at making a DLL for both Info_Zip and MS *.cab's....I figured out how to handle callback functions in VDS DLL's when I built the messaging API piece of my gadget dll so I think it would be possible to do it. I am not going to make Info_Zip's or MS's Gab's compression a part of my gadget dll because then I would either have to wrap both of Info_Zip's zip32.dll/unzip32.dll and MS's cabinet.dll into my gadget dll or make people carry those dll's with my gadget dll. So I am going to build a seperate DLL for doing just that. My gadget dll will have some low level compression routines built into it but as purely beta/research functions and commands. One of them will be the Huffman encoding algorythm and the other one will be the LZ compression algorythm. This may allow for some smart VDS programmer out there to build our own compression/archiving system Wink So who knows....

_________________
Home of

Give VDS a new purpose!
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 -> Wish List 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