 |

04-23-2001, 02:27 AM
|
|
|
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
|
|

04-23-2001, 04:14 AM
|
|
Original Contributor
Retired Moderator * Guru *
|
|
Join Date: Jan 2001
Location: Watch Window
Posts: 2,781
|
|
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
|

04-25-2001, 03:31 AM
|
|
|
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
|
|

04-25-2001, 03:50 AM
|
 |
Code Meister
Retired Moderator * Guru *
|
|
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
|
|
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
|

04-26-2001, 12:58 AM
|
|
|
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.
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|