| View previous topic :: View next topic |
| Author |
Message |
citosoft Newbie
Joined: 30 Nov 2006 Posts: 13
|
Posted: Thu Nov 30, 2006 6:45 pm Post subject: Hello All! Question for any VDS God! |
|
|
Hello! I'm new to the Forums, but not to VDS. I love VDS! Over the years, I've silently watched it grow. Anyways, I have a question,
I am trying to append something to a variable. Ex.
%%ThisVar = John
%%ThatVar = Doe
%%Another = 203994
What If I want %%ThisVar to = JohnDoe203994
%%ThisVar = JohnDoe203994
I would like to know how to keep appending something to the end of a var. I tried
%%ThisVar = %%ThisVar%%ThatVar but didnt work. Any ideas?
Thanks Alot
--Chris
|
|
| Back to top |
|
 |
citosoft Newbie
Joined: 30 Nov 2006 Posts: 13
|
Posted: Thu Nov 30, 2006 6:47 pm Post subject: Could it be... |
|
|
| Could it be @STRINS ?
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Nov 30, 2006 7:05 pm Post subject: |
|
|
You mean something like this?
| Code: | %%Name1 = John
%%Name2 = Doe
%%Number = 203994
%%ThisVar = %%ThisVar%%Name1%%Name2%%Number
%%Name1 = Pete
%%Name2 = Miles
%%Number = 321321
%%ThisVar = %%ThisVar%%Name1%%Name2%%Number
%%Name1 = Richard
%%Name2 = Nixon
%%Number = 456654
%%ThisVar = %%ThisVar%%Name1%%Name2%%Number
info %%ThisVar |
You could put it into a while-wend or repeat-until loop if you have a list with multiple items
Btw. Welcome to the VDSWORLD forums Chris
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
citosoft Newbie
Joined: 30 Nov 2006 Posts: 13
|
Posted: Thu Nov 30, 2006 7:36 pm Post subject: Hm |
|
|
Basically Yes, I just want a loop that will continue appending chars to a var. For example, i am using a BINFILE operation to read each char at a time of a file, i want what it reads, to be stored into a VAR using a loop. Something like this
%i = 0
%%POS = 0
Repeat
%%POS = @SUCC(%%POS)
BINFILE SEEK,1,%%POS
%%READ = @BINFILE(READ,1,TEXT,1)
%%COMP = %%COMP + %%READ <--- ? Course this isn't Visual Studio lol
UNTIL @EQUAL(%%READ,&)
Eventually, the & char is the delimiter for telling me when the end of a LINE of information is. So What I want, since BIN FILE is reading character for character, I want to keep appending the characters it reads to a var. Hope this makes sense.
Thanks
|
|
| Back to top |
|
 |
citosoft Newbie
Joined: 30 Nov 2006 Posts: 13
|
Posted: Thu Nov 30, 2006 7:39 pm Post subject: |
|
|
%%ThisVar = %%ThisVar%%Name1%%Name2%%Number
This cause one huge variable name to exist
%%ThisVar%%Name1%%Name2%%Number <-- This would be one long variable name rather than appending each variable.
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Nov 30, 2006 7:42 pm Post subject: |
|
|
citosoft,
Here ya go... You don't need the + sign just stick the 2 variables together.
| Code: |
%i = 0
%%POS = 0
%%COMP =
Repeat
%%POS = @SUCC(%%POS)
BINFILE SEEK,1,%%POS
%%READ = @BINFILE(READ,1,TEXT,1)
%%COMP = %%COMP%%READ
UNTIL @EQUAL(%%READ,&)
|
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
citosoft Newbie
Joined: 30 Nov 2006 Posts: 13
|
Posted: Thu Nov 30, 2006 7:44 pm Post subject: |
|
|
When I do that, it detects %%COMP%%READ as one big variable tho? Should %%COMP = something first, cause initially %%COMP is empty.
At least the debugger shows %%COMP%%READ as one variable name
|
|
| Back to top |
|
 |
citosoft Newbie
Joined: 30 Nov 2006 Posts: 13
|
Posted: Thu Nov 30, 2006 7:49 pm Post subject: |
|
|
Anyone interested in making a custom DLL for me with a simple database like function ?
Nutshell: (What I need)
DB WRITE,92039
DB WRITE,93003
DB WRITE,02939
%CHECK = @DB(EXIST,92039) ; Does this record exist?
Thats it.. simple and sweat. Willing to pay, but needs this within 2 days.
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Nov 30, 2006 9:17 pm Post subject: |
|
|
citosoft,
The code I posted to you before works. I just tested it. Here it is again as an attachment. The reason I did the %%COMP variable like I did is so it can have a memory address before I try to assign it to itself. VDS will treat it as a empty string.
| Description: |
| This is a text file for the code to read. |
|
 Download |
| Filename: |
lst.txt |
| Filesize: |
3.11 KB |
| Downloaded: |
1599 Time(s) |
| Description: |
| This is the code from the previous post. |
|
 Download |
| Filename: |
testlongvarnames.dsc |
| Filesize: |
958 Bytes |
| Downloaded: |
1443 Time(s) |
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Nov 30, 2006 9:25 pm Post subject: |
|
|
| citosoft wrote: | Anyone interested in making a custom DLL for me with a simple database like function ?
Nutshell: (What I need)
DB WRITE,92039
DB WRITE,93003
DB WRITE,02939
%CHECK = @DB(EXIST,92039) ; Does this record exist?
Thats it.. simple and sweat. Willing to pay, but needs this within 2 days. |
VDS already has commands and functions that are similar. Take a look at the List commands/functions. If that is not to your liking there are several DLL's for databases.
| Code: |
List create,1
List Add,1,92039
List Add,1,93003
List Add,1,02939
%%Check = @Match(1,92039)
If %%Check
Info We have a match
Else
Warn It's not in there
End
|
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
citosoft Newbie
Joined: 30 Nov 2006 Posts: 13
|
Posted: Thu Nov 30, 2006 9:39 pm Post subject: |
|
|
Yes I am aware of the LIST functionality however, I need to use a static DB on file somewhere to check against. Reason is because there are records for example that are being PRINTED in my software, and we want a DB on file to check against to determine if the record was printed already or if it is an updated one. I could always use INI which is fast, but not great in larger DB sizes like 20MB - 100MB etc. I was looking a the SQ3 LIte but it looks a bit much for what i need. Not sure yet. But a custom DLL would be GREAT !
Hey we're willing to pay simply because we are limited for time. Let me know though if anyones interested. Thanks for all the help also. I hope we'll get well acquainted here.
_________________ <img>http://www.axistechsystems.com/citologo.gif</img> |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Nov 30, 2006 9:49 pm Post subject: |
|
|
citosoft,
There are 2 commands in my GadgetX.dll that may be what you need. The commands are the Dictionary and the BinList commands. Basicly they are similar to the VDS list commands but they are on steroids. The Dictionary command is a highspeed lookup table similar to a INI file. The BinList commands are almost exactly like the VDS list but able to load really large amounts of data. Both commands are more than capable of handling small files like 50 - 100 MBytes. The dictionary commands will give you the fastest lookups but it does not have all the fancy commands and functions as the BinList command does.
shameless plug
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
citosoft Newbie
Joined: 30 Nov 2006 Posts: 13
|
Posted: Thu Nov 30, 2006 11:33 pm Post subject: |
|
|
Yes, I've taken a gander at your site. It looks interesting, but will it make for easy syntax and is it stable ? Will the program run on Server 2003 also? And lastly, will it make for easy syntax?
Assuming it also writes to a file rather than memory?
Thanks.
_________________ <img>http://www.axistechsystems.com/citologo.gif</img> |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Dec 01, 2006 1:17 am Post subject: |
|
|
To Answer your questions...
The syntax is IMHO as simple as VDS. However I have been using VDS since version 2.03 so my knowledge of VDS and the GadgetX.dll is a bit more than others.
Yes I use it every single day on Windows Server 2003. The DLL has been throughly tested with the following versions of Windows... Win9x, WinME, NT, Win2k Pro, Win2k Server, Win2003 Server, WinXP Home Edition, and WinXP Pro both SP1 & SP2.
I have not tested the DLL on the following versions of Windows... Vista or WinXP 64 Pro. There is no technical reason why it should not work on these OS'es but I don't own them so I have not been able to test the DLL on them.
Yes I would consider the DLL to be stable. I use it everyday in my daily job as a Application Performance Analyst where I require the abilities to test Enterprise level software. The DLL is used to build supporting utilities and to manage large quanties of data.
Also I have provided 4 to 5 different ways to contact me. Registered users have access to a support system where you can submit trouble tickets and monitor the work on those tickets. Registered users also have access to the Message board where they can submit a wish list or discuss how to get things to work.
Below is a code snippet from one of the included examples using the Dictionary commands and functions.
| Code: |
Title GadgetX Dictionary
If @Greater(@Name(@SYSINFO(DSVER)),4)
External gadgetx.dll,@Sysinfo(DSVER)
#DEFINE COMMAND,DEFINE,DICTIONARY
#DEFINE FUNCTION,DICTIONARY
Else
Warn This demo will only work with VDS 5+
Stop
End
# Use the define command to create the Dictionary
Define Dictionary,IMSlang
# Load the dictionay with items.
Dictionary LoadFile,IMSlang,@Path(%0)dict.txt
DIALOG CREATE,Give me some IM Slang,-1,0,361,228,SMALLCAP
REM *** Modified by Dialog Designer on 11/7/2006 - 17:34 ***
DIALOG ADD,TEXT,TEXT1,32,49,30,13,Slang:
DIALOG ADD,EDIT,EDIT1,28,83,231,19,
DIALOG ADD,TEXT,TEXT2,63,27,49,13,Definition:
DIALOG ADD,EDIT,EDIT2,63,80,234,75,,,MULTI,SCROLL
DIALOG ADD,BUTTON,QUIT,172,147,64,24,Quit
DIALOG SHOW
:evloop
wait event,0.003
%E = @event()
If %E
goto %E
End
goto evloop
:TIMER
%A = @dlgtext(EDIT1)
if %A
# Find the text that the user typed.
# NOTE: since this is in a timer sub the Wait command slows
# the showing of the definition otherwise this would be instant.
%%Found = @Dictionary(Find,IMSlang,@LOWER(%A))
If %%Found
Dialog Set,EDIT2,%%Found
Else
Dialog Set,EDIT2,
End
else
Dialog Set,EDIT2,
end
goto evloop
:QUITBUTTON
:CLOSE
Exit
|
At this point all I can say is try it? Ask some of the others on this forum about the DLL? It's abilities speak for themselves. You asked for a simple way to keep a large static list and to do lookups in that list really fast. The DLL has the abilities. Now to be practical it would always be better to keep large amounts of data in a industry standard database and there are other database DLL's but I am like you I don't want to learn and use SQL or ODBC hence the reason for this DLL.
You will find that the developers on here have really high quality standards that we follow. No one tells us too we just do. We like software that works and we depend on this software for really important stuff. So much of the software you find here is IMHO of a higher quality than you will find at other shareware shops.
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
citosoft Newbie
Joined: 30 Nov 2006 Posts: 13
|
Posted: Fri Dec 01, 2006 2:27 pm Post subject: This Sound sGreat |
|
|
I like all the extended functions, but tell me directly though, does it write and store the information to a file? Sorry If I've mis-understood you. If the application closes and re-opens another day, will the data still be accessible?
_________________ <img>http://www.axistechsystems.com/citologo.gif</img> |
|
| Back to top |
|
 |
|
|
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
|
|