Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > multi-dimensional arrays


Reply
 
Thread Tools Display Modes
  #1  
Old 04-23-2001, 02:27 AM
Buxton_MEng
Guest
 
Posts: n/a
Question multi-dimensional arrays


I have a problem where I will create multiple polygones based on previous ones. I need to identify the polygone which will each have two sets of data (x & y). I've looked through "Visual Basic for Dummies" and the MS VB tutorial on CD-Rom, but they seem to be lacking with respect to writing code. Is there a good on-line sourse for QBasic commands?

I was thinking that I could declare the variable as:
dim polypoints(ident,x,y) as single

The data would be something like this(x,y)
Id#1-----Id#2-----Id#3 -----etc.
0,0 ----- 0,0 ----- 0,0
1,3 ----- .5,2--- .4,1.7
3,1-----2,2.5------1,2
-----------3,1-----2.5,2
----------------------- 3,1

Also, how can I execute a command in MS-DOS from VB so I could recuperate the resulting file? For example:
"C:\awk\awk -f awkprog filedata.dat > trandata.dat"
This activates the awk program to manipulate the filedata.dat using the awkprog translator to convert it to the file trandata.dat.

Thanks


Reply With Quote
  #2  
Old 04-23-2001, 04:14 AM
JDT JDT is offline
Original Contributor

Retired Moderator
* Guru *
 
Join Date: Jan 2001
Location: Watch Window
Posts: 2,781
Default Re: multi-dimensional arrays

Hi buxton_MEng

Its too late (or early) for me to think about multidimensional arrays 8<)

But for your question on executing a command in MS-DOS from VB I would look into using the Shell() function. Although the spaces could cause a problem, it might look like this:

<pre> Shell "C:\awk\awk -f awkprog filedata.dat > trandata.dat" </pre>

JDT

__________________
JDT
Reply With Quote
  #3  
Old 04-25-2001, 03:31 AM
Buxton_MEng
Guest
 
Posts: n/a
Default Re: multi-dimensional arrays

Thanks for the info. I just beginning with VB so I like to rely on things I understand. AWK for example, in case you didn't know, is a cool language for pattern matching and manipulating data. It is structured a bit like C, but without all the pointer garbage.

Rich

Reply With Quote
  #4  
Old 04-25-2001, 03:50 AM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default Re: multi-dimensional arrays

Videosoft (www.componentone.com) includes an AWK control in their VSOCX package. It's a parsing control with pattern matching capability. I don't know how it matches up with what you consider AWK though....

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #5  
Old 04-26-2001, 12:58 AM
Buxton_MEng
Guest
 
Posts: n/a
Default Re: multi-dimensional arrays

Sounds like the same thing. Normally, AWK is used as a tool on Unix systems, but I use an MS-DOS version to try algorithms at home.

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->