Bluebit Software
Bluebit Software Support Forum
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



Declaration Required Expand / Collapse
Message
Posted Saturday, June 06, 2009 7:56 PM Post #555
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

I've been programming for forty years (FORTRAN, COBOL, BASIC) but am a total Noob when it comes to OOP.

So far this is what I have

Imports Bluebit.MatrixLibrary

Public Class Form1
Dim A As Matrix
Dim B As New Matrix(40, 40)
A = B.SubMatrix(0, 20, 0, 20)
End Class

I get a "Declaration Required" error on the 6th line (A=....)
What am I doing wrong?

Posted Monday, June 08, 2009 4:53 AM Post #556
 

Bluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit Support
Hello,

You can either use this syntax:

Imports Bluebit.MatrixLibrary

Public Class Form1

Dim B As New Matrix(40, 40)
Dim A = B.SubMatrix(0, 20, 0, 20)
End Class

or something like this:

Imports System
Imports Bluebit.MatrixLibrary


    Public Class Form1
        Dim A As Matrix
        Dim B As Matrix

        Public Sub DoSomething()

            B = New Matrix(40, 40)
            A = B.SubMatrix(0, 20, 0, 20)

        End Sub

    End Class



Trifon Triantafillidis

Lead Developer

Bluebit Software

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Trifon

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 5:42am

Powered by InstantForum.NET v4.1.4 © 2013
Execution: 0.453. 18 queries. Compression Disabled.
.NET Matrix Library