Funzione VBScript Oct


❮ Riferimento completo di VBScript

La funzione Oct restituisce una stringa che rappresenta il valore ottale di un numero specificato.

Nota: se il numero non è già un numero intero, viene arrotondato al numero intero più vicino prima di essere valutato.

Sintassi

Oct(number)

Parameter Description
number Required. Any valid expression

If number is:

  • Null - then the Oct function returns Null.
  • Empty - then the Oct function returns zero (0).
  • Any other number - then the Oct function returns up to 11 octal characters.

Esempio

Esempio

<%

response.write(Oct(3) & "<br />")
response.write(Oct(5) & "<br />")
response.write(Oct(9) & "<br />")
response.write(Oct(10) & "<br />")
response.write(Oct(11) & "<br />")
response.write(Oct(12) & "<br />")
response.write(Oct(400) & "<br />")
response.write(Oct(459) & "<br />")
response.write(Oct(460) & "<br />")

%>

L'output del codice sopra sarà:

3
5
11
12
13
14
620
713
714

❮ Riferimento completo di VBScript