Funkcija CByte

Pretvori niz ali numeričen izraz v vrsto Byte.

Skladnja:


Cbyte(izraz As Variant) As Byte

Vrnjena vrednost:

Byte

Parametri:

Izraz: poljuben niz ali številski izraz, ki ga je mogoče ovrednotiti s številom. Števila z decimalkami se zaokrožijo na najbližjo desetinko. Veljavne vrednosti so v obsegu od 0 do 256.

Kode napak:

5 Neveljaven klic procedure

6 Prekoračitev

Primer:


  Sub CByte_example
      Print CByte( expression := "17"/2 + 7.44), CByte(EMPTY), CByte(PI)
      ' Zgornji izrazi se izračunajo kot 16, 0 in 3
  End Sub

D'oh! You found a bug (text/sbasic/shared/03100300.xhp#CDate_h1 not found).

D'oh! You found a bug (text/sbasic/shared/03100400.xhp#CDbl_h1 not found).

D'oh! You found a bug (text/sbasic/shared/03100060.xhp#CDec_h1 not found).

D'oh! You found a bug (text/sbasic/shared/03100500.xhp#CInt_h1 not found).

D'oh! You found a bug (text/sbasic/shared/03100600.xhp#CLng_h1 not found).

D'oh! You found a bug (text/sbasic/shared/03100900.xhp#CSng_h1 not found).

D'oh! You found a bug (text/sbasic/shared/03101000.xhp#CStr_h1 not found).