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.

Ganze Zahl bestimmen

Empfohlene Antworten

Hi,

gibt es in asp eine funktion, die feststellt ob es sich bei einer zahl um eine Ganzzahl handelt oder nicht?

Wenn Ergebnis z.B. 1;2; 14; 99, dann wahr

wenn Ergebnis z.B. 1,5; 2,3; 77,456, dann falsch

so

etwas wie Integer.parseInt(<meinevariable>) == <meinevariable> ??

Einfach mit einer Modular-Division prüfen:

if i mod 1 = 0 Then <meineVariable> = true

Ist "i mod 1" nicht immer 0? Ich glaube, du meintest "i mod 2 = 0".

Ist "i mod 1" nicht immer 0? Ich glaube, du meintest "i mod 2 = 0".

Nein. "i mod 1" ist nur bei Ganzzahlen 0.

"i mod 2 = 0" würde man zur Erkennung von geraden Zahlen verwenden.

Woops, jetzt habe ich glatt Ganzzahlen mit geraden Zahlen verwechselt. My bad.

i mod 1 ergibt leider in meinem Fall immer 0? irgendetwas stimmt nicht.

i ist ja die variable.

i=1, dann 0

i=2,5 dann 0

wo ist der Fehler??

Funktioniert die Funktion in asp?? vbscript??

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.