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.

switch statement

Empfohlene Antworten

hi leute,

gibt es eine möglichkeit ein switch statement in folgender form aufzubauen?


swicht (Formular)

{

case  .name == "dieter"         : " blabal";break;

case  .alter == 12                   : " blabal";break;

case  .datum == 02.02.2002  : " blabal";break;

case  .ort == "dortmund"       : " blabal";break;

}

ich will quasi ein object im swicht reinsetzen und beim case dann die attribute dieses objectes abfragen..

ist das irgendwie möglich? oder muss ich 4 If abfragen bauen?

mir is klar das das so nicht geht wie ich es oben geschrieben hab,....

gruss

kills

Meines Wissens nach geht sowas nicht.

Aber macht das denn überhaupt Sinn?

Der "switch" Befehl ist ja dafür da, um genau EIN Attribut zu überprüfen und abhängig vom Wert das eine oder andere zu machen.

Es könnten ja theoretisch auch in deinem Beispiel sowohl der Ort = 'Dortmund' als auch das Datum = '02.02.2002' sein?!

alles klar.

danke für die aufklärung .)

hat mich ma interessiert ob das möglich ist.

habs soweit anders gelöst

viele grüße

und danke

gruss

kills

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.