Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

VB help

Name: Fag 2010-11-23 18:37

I'm trying to code a matrix in visual basic. If you don't know what a matrix is, it's an array used in mathematics. Think of it like a grid consisting of x # of rows and y # of columns. Then you select the coordinates (x,y) and set a value.

So far in my program i have it so that the user can select the size of the matrix (x,y). But my problem is assigning the matrix to the size.

I have a dilemma because i need my string "MatrixA" to be outside of a a SUB category. But if i do that then when i reference the MatrixA, it can't make the connection.

When i create the string MatrixA inside the sub i'm working on it in, it is able to reference back to it just fine. Here is my major problem...

Sine i created MatrixA inside the SUB, every time it loops that SUB, it resets the value of MatrixA. You can see how this is problematic.

Example
First loop
SUBa
size = 2, 2

SUBb
Creats MatrixA and calls size from SubA
0, 1 = 3
(It does rows before colums)
| |3|
| | |

SECOND LOOP
Recreates MatrixA
SUBb
1, 1 = 4
| | |
| |4|

It cleared my previous assignment of 0, 1 = 3 because it recreated MatrixA.

Overview, I can't recall MatrixA outside of SUBb for some reason. But when i create MatrixA INSIDE SUBb, it recreates it each instance and makes it impossible to be of any use.

Name: Anonymous 2010-11-23 19:46

If you don't know what a matrix is, it's an array used in mathematics.

Name: Anonymous 2010-11-23 20:13

Where are you purporting to come from?

Name: Anonymous 2010-11-23 20:22

COMEFROM

Name: Anonymous 2010-11-23 21:57

>>3
do i have to bust a nut inside your eye to show you where i come from?

Name: Anonymous 2010-11-24 3:02

>I'm trying to code a matrix in visual basic.
Now you have two problems.

Name: Anonymous 2010-11-24 4:58

This Visual Basic™ programmer assumes very little knowledge of us. Perhaps it is because we are attached to $chon?

Name: Anonymous 2010-11-24 16:47

wat

Name: Anonymous 2010-11-24 16:50

Just use one-dimensional arrays and index arithmetic.

Name: Anonymous 2010-11-24 18:19

>>1
If you don't know what a matrix is
So let me get this straight: you're trying to ask people who don't know what a matrix is how to implement one?

Name: Anonymous 2010-11-24 18:30

Okay, I think I managed to make a modicum of sense from that:
- Why is MatrixA a string when you want a matrix?
- Why are you looping at all?

Name: Anonymous 2011-02-04 17:21

Don't change these.
Name: Email:
Entire Thread Thread List