Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VBS: Class und Array

Empfohlene Antworten

Veröffentlicht

Hallo!

ich hab da ein problem das ich in "Grundschule" einstufe, aber irgendwie krieg ichs einfach net gebacken :(

Ich möchte eine Klasse erschaffen, und die als Feld benutzen.

In C++ müsste das ungefähr so aussehen (c++ is ne weile her, haut mich nich wenn ich die "Grammatik" ein wenig verschlampt habe) ;)

Class Cl_Liste
{
var Name = String;
var Pfad = String;
}

var Liste(10) = Cl_Liste;
Liste(1).Name = "Blabla";[/PHP]

Herumexperimentiert habe ich in etwa so, wobei ich die (10) wie wild verschoben hab:

[PHP]Dim Liste(10)

Class Cl_Liste
Dim Name
Dim Pfad
End Class

Set Liste(10) = new Cl_Liste

liste(1).Name = "Blabla"

Fehlermeldung ist nahezu immer "Objekt erforderlich"

Vielen Dank für jede Bemühung :)

/Gringorius

Ohje, ohje, ist mir das peinlich :(

Bitte fragt mich nicht warum ichs nicht einfach so mache:

Dim Liste

Class Cl_Liste
Dim Name(10)
Dim Pfad(10)
End Class

Set Liste = new Cl_Liste

liste.Name(1) = "Blabla" [/PHP]

Im Grunde ist es ja eh dasselbe. Von der Handhabung, vom Speicherverbrauch, ... :rolleyes:

Lag wohl daran, das ich zu sehr in c++ gedachte habe!?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.